You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After activating cache_db in system-settins it is no longer possible to filter the system-settings by namespaces
Step to reproduce
Activate cache_db setting then click click on "Filter by namespace"
Observed behavior
Depending on error reporting the click produces an error-alert: "Code: 0 communication failure" or just leaves the system-setting site in an unusable state.
Expected behavior
Show a list of namespaces for filtering.
Environment
MODX Revolution 3.1.0-pl (traditional), Apache/2.4.62 (Unix), PHP Version 8.2.20, 10.6.19-MariaDB
The text was updated successfully, but these errors were encountered:
raffy99
added
the
bug
The issue in the code or project, which should be addressed.
label
Jan 4, 2025
As far as I can tell, the processor (to load the available namespaces) runs a query like SELECT GROUP_CONCAT(DISTINCT `settingsNamespace`.`namespace` SEPARATOR '","') AS namespaces FROM `modx_system_settings` AS `settingsNamespace`
here in the code:
When cache_db is set to "Yes", MODX tries to save the result from this query to the cache as a modSystemSetting. But the primary key is missing (as it's not possible to include it in an SQL query like this) and that breaks the code.
The easiest solution is probably to add the third parameter ($cacheFlag) to this call of getObject(), so that the result is never cached:
Thanks for looking into this. Adding the the cacheFlag-parameter to the call solves the problem.
This bug was not in 3.0.6, which change caused the error?
Bug report
Summary
After activating cache_db in system-settins it is no longer possible to filter the system-settings by namespaces
Step to reproduce
Activate cache_db setting then click click on "Filter by namespace"
Observed behavior
Depending on error reporting the click produces an error-alert: "Code: 0 communication failure" or just leaves the system-setting site in an unusable state.
Expected behavior
Show a list of namespaces for filtering.
Environment
MODX Revolution 3.1.0-pl (traditional), Apache/2.4.62 (Unix), PHP Version 8.2.20, 10.6.19-MariaDB
The text was updated successfully, but these errors were encountered: