- 06 Jan, 2025 1 commit
-
-
Jérome Perrin authored
erp5_site_global_id was from the tiolive time, when we were using ERP5 with mariadb and memcached instances shared by many zope instances, this was used as a way to implement namespaces in memcached, to prevent conflicts such as two different zope using the same cache keys. Nowadays, we no longer share memcached, each ERP5 instance has its own memcached and this prefixing is no longer needed, but there is still one exception, when we run test using runTestSuite with --node_quantity higher than 1, we have multiple running test instances sharing the same mariadb and the same memcached. In that case, each test instance uses a different mariadb database, but the risk of conflict remain for memcached. To solve this, we use derive a prefix from mariadb connection string and use it in memcached. This was more or less what the current implementation was trying to do, but we were setting erp5_site_global_id on the wrong object, so it was not working since 4889d523 (Define property's default value at class level., 2012-12-31). Also, this was only done at the level of SharedDict, but some APIs such as CacheTool or SessionTool use MemcachedDict directly. Also, there was a problem that we did not notice yet, because the previous implementation was doing nothing: memcached keys are limited in size, to overcome this, we don't use the full connection string in base64 (which is around 70 characters), but a short hash of the connection string.
-
- 03 Jan, 2025 1 commit
-
-
Nicolas Wavrant authored
See merge request !2034
-
- 02 Jan, 2025 3 commits
-
-
Nicolas Wavrant authored
Infinite listbox are listboxes for which the "lines" property is set to 0, meaning the listbox shouldn't try to paginate results.
-
Nicolas Wavrant authored
This is intentional, and means that no limit should be applied (iow: an infinite listbox). In this case, the limit parameter in the call to jIO should be set to 0, not undefined, otherwise the parameter will be dropped in the AJAX request, and later on be defaulted to 10 by ERP5Document_getHateoas.
-
Nicolas Wavrant authored
If the max number of lines of a listbox was set to 0, meaning "no limit set", then ERP5Document_getHateoas would still return a paginated list of 10 results, 10 being the default set in the parameters of ERP5Document_getHateoas. It looks like there is a beginning of support for such case in ERP5Document_getHateoas, with the appearance of code such as "if limit", but the bug comes from the lack of typing in the JS-jIO-JSON-ERP5's HAL interface. In case of a limit set to 0 in the listbox configuration, ERP5 would receive the string "0" which is a non empty string. It would fail the condition and would be handled like there is a limit, or of 0 - so no result - or of a default limit chosen by the code.
-
- 30 Dec, 2024 1 commit
-
-
Titouan Soulard authored
The script `Base_createCloneDocument` was made to be user-friendly, reporting nice errors instead of throwing when a problems is detected. These errors are displayed using the `portal_status_message` parameter of `Base_redirect`, which looks like a warning on XHTML-style, but appears green with RenderJS. This commit adds an optional parameter `portal_status_level` to all calls to `Base_redirect` which are actually errors, so that they also look like a warning or error (orange background) on RenderJS. The behaviour in XHTML-style says identical. /cc @romain @vpelletier
-
- 25 Dec, 2024 1 commit
-
-
Jérome Perrin authored
-
- 23 Dec, 2024 2 commits
-
-
Titouan Soulard authored
String value raised with `ValueError` had an extra `%s` at the end, hence raising another error when formatting: > TypeError: not enough arguments for format string This commit simply removes the extra formatting character, since I could not guess what should have been printed here.
-
Titouan Soulard authored
The ZSQLMethod was using a wrong table `movement` instead of the `stock` table, hence throwing errors. This commit makes it use the right table, by adding a filter on `node_uid`, taking into account the structure of the new table. /reviewed-by @jerome /reviewed-on !2030
-
- 19 Dec, 2024 2 commits
-
-
Roque authored
See merge request nexedi/erp5!2029
-
Roque authored
-
- 18 Dec, 2024 4 commits
-
-
Rafael Monnerat authored
-
Roque authored
-
Roque authored
-
- 17 Dec, 2024 1 commit
-
-
Rafael Monnerat authored
-
- 14 Dec, 2024 4 commits
-
-
Jérome Perrin authored
-
Jérome Perrin authored
- follow Zope4 ZMI style guide - remove the confusing "Upgrade" button and the associated method `manage_refresh` doing nothing - use `form-control` and `code` CSS classes for better looking fields
-
Jérome Perrin authored
-
Jérome Perrin authored
-
- 13 Dec, 2024 7 commits
-
-
Jérome Perrin authored
-
Jérome Perrin authored
When refresh_token is still valid google's endpoint does not include the current refresh token in the response when refreshing the token, we need to keep the current one. This fixes user logout every one hour.
-
Jérome Perrin authored
-
Jérome Perrin authored
So that version view works as expected, see b415abbb (dms: add version view on notification messages, 2024-06-19)
-
Jérome Perrin authored
See merge request nexedi/erp5!2011
-
Vincent Pelletier authored
Fix bugs: - Fix an acquisition context bug: the user found here would be wrapped in the acquisition context of self, and as a result SecurityManager.validate may consider the user to be outside of the acquisition path of the document being checked (ex: when accessing a module while publishing a web section). - While unusual, there may be multiple users matching a given request, which is handled by ZPublisher but was skipped here. Also: Document: - Why this method is needed. - assumptions made to get simpler code. Improve performance: - portal_membership._huntUser looks the user up twice, which is expensive. Stop using this method. - When the request is a fake request (from restrictedTraverse) nothing can nor should be done, so bypass the entire logic that case. - Assorted tiny improvements: do not retrieve security manager twice, avoid extraneous local assignments, ... Improve coding style: - Stop accessing portal_membership's underware. - Stop accessing PluggableAuthenticationService's underware. - Simplify disabled cache support: this is exceedingly rare, optimise for when it is enabled. - Do not hardcode log level, also increase the severity: this really is a warning. - Do not try to decode Basic-auth, this is the job of the user folder. This removes duplicated code.
-
Yusei Tahara authored
Set table:number-columns-spanned to each cell outside listbox/matrixbox.
-
- 06 Dec, 2024 1 commit
-
-
Rafael Monnerat authored
Like it is done for option, remove default from schema after append the value into decription.
-
- 21 Nov, 2024 1 commit
-
-
Léo-Paul Géneau authored
See merge request nexedi/erp5!2004
-
- 20 Nov, 2024 2 commits
-
-
Léo-Paul Géneau authored
-
Léo-Paul Géneau authored
-
- 18 Nov, 2024 2 commits
-
-
Léo-Paul Géneau authored
-
Léo-Paul Géneau authored
Limit printed decimals in flight log file for readability.
-
- 15 Nov, 2024 1 commit
-
-
Nicolas Wavrant authored
See merge request nexedi/erp5!2017
-
- 14 Nov, 2024 1 commit
-
-
Nicolas Wavrant authored
By pre-fetching some catalog entries to retrieve objects UIDs that can directly be used in the inventory query, to avoid needless (costly) joins and hinting the catalog to use the resource_section_node_uid index of the stock table.
-
- 12 Nov, 2024 5 commits
-
-
Xiaowu Zhang authored
See merge request nexedi/erp5!2012
-
Roque authored
See merge request nexedi/erp5!2016
-
Roque authored
-
Jérome Perrin authored
The test from 6316d9bb (Formulator: test form serialization with non ascii elements, 2024-10-24) revealed that form with an encoding other than UTF-8 are not supported.
-
Jérome Perrin authored
-