virtudraft / crosscontextssettings Goto Github PK
View Code? Open in Web Editor NEWA MODX's custom plugin to manage cross contexts' settings
A MODX's custom plugin to manage cross contexts' settings
I have 7 contexts. In the CrossContextsSettings panel I see nothing. Panel "Clear cache" also is empty.
However, on the other site with 3 contexts it works fine.
How can I make it workable on site with big number of contexts?
Sometimes during creating or editing a setting (I can't reproduce that at the moment) context settings with the context_key 'namespace' occur in the db. Also context settings with the context_key 'area' occur in the db.
UserInterface: All settings value input are text in the gridview, it should be according to the setting input type.
Bug: Any creation of setting on another context is with value input type "text" whatever the original input type was.
upon context setting change whether value change or remove of setting, Context cache shall be refreshed:
$modx->cacheManager->refresh(array(
'context_settings' => array('contexts' => '$k')
));
Think you should extend the modObjectUpdateProcessor class in https://github.com/virtudraft/CrossContextsSettings/blob/master/core/components/crosscontextssettings/processors/mgr/settings/updatefromgrid.class.php#L28 and the process method has to return $this->cleanup();
If a setting was not created for one of the contexts, updating the setting value causes the setting to be deleted for all contexts.
Reproduction steps:
1-Create a new setting for 1 context
2-Open CrossContextSettings CMP
3-Change the value of the created setting for another context.
Result: the setting is totally deleted.
Expectations: the setting should have been created for the other context with the entered value
NameSpace dropdown shows only one line, and upon changing the name space the dropsown doesn't work anymore.
When setting a value for a setting for another context, the setting gets created missing the "Area"
and with wrong value input type issue #10
In a custom renderer for Collections, we've had a reference to a Cross Context Setting key of "site_folder" for several years.
collections.renderer.site_image = function(value, metaData, record, rowIndex, colIndex, store)
{
if (value)
{
if (value.includes("http")) // used for images with full url
{
var imgURL = value;
}
else
{
imgURL = '/sites/' + **MODx.config['site_folder']** + '/' + value;
}
console.log(MODx);
//return imgURL;
return '<img src="' + imgURL + '" width="64">';
}
};
After the update to 2.7.1 it appears that the value is no longer accessible in the MODx.config array
(or anywhere in the MODx array for that matter) and so the thumbnails are not being rendered. The only thing that changed was the MODX version. Collections and Cross Context Settings are both up-to-date.
Maybe this option is disabled by default in a MODx.grid, because it should be true by default according to Sencha docs.
Local installation MODX 2.7.1, MySQL 5.7.23, CrossContextSettings 1.0.5-pl
Errorlog:
Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'xyz.modContextSetting.context_key' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
No values are shown in the grid.
mysql > SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
Only valid until restart of mysql server
The option ONLY_FULL_GROUP_BY
seems to be default in MySQL.
no error
The pagination doesn't seem to be working in version 1.0.3, modx 2.4.0.
The only way to currently see the next values is by increasing the 'items per page' value.
Remove beta status โฆ
Only 20 contexts are displayed in the control panel. It looks like the script uses the default limit in modprocessor.class.php rather than the modx limit system setting, so it will only ever return 20. Updating the default in the file shows all our contexts.
The grid of CCC lists only contexts settings of the core namespace per default. If you click on 'Clear Filter' it lists contexts settings of all namespaces.
It should be possible to have a new context setting for all contexts with one button. Maybe with checkboxes in the window for which contexts this setting should be created.
The form panel in the create window does not get overflow-y: scroll !important
, just overflow-y: scroll
. That way it is not possible to scroll inside, since this rule is working.
.x-window form.x-panel-body:first-of-type {
overflow: visible !important;
}
Hi,
Nice components. It displays my web + en CX for core spacename when launched, but if I switch to "babel" (the only other space name available), it fires the following error:
Code: 404 Not Found
{"success":false,"message":"Processeur getareas introuvable.","total":0,"data":[],"object":[]}
And then no way to switch back to core display, the select is 'dead'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.