Hej,
i updated a site from MODX 2.8.6 to 3.0.4. Everything works fine. I use the CMP from MIGX 3.0.2-beta1 to edit data from a custom database. The schema for this is updated to MODX3.
Now i only see three tabs and no fields when adding/editing items in the MIGX modal. So i discovered the code that in core/components/migx/model/migx/migx.class.php the getRenderDirectories() doesn’t get the right path for MODX3 TV fields. I added this path on line 2005 and it works now:
When I test this on MODX 3, the path .../core/src/Revolution/Processors/Element/TemplateVar/Renders/mgr/input/
gets correctly added to the list in the MODX function getRenderDirectories()
I don’t think it’s necessary to update the schema for existing custom packages.
Only when you want to parse the schema with MIGX in MODX 3, the schema has to be in version="3.0".
When I test this on MODX 3, the path .../core/src/Revolution/Processors/Element/TemplateVar/Renders/mgr/input/
gets correctly added to the list in the MODX function getRenderDirectories()
Thank you @halftrainedharry. Is it a fresh Install or an upgrade from 2.x?
I don’t think it’s necessary to update the schema for existing custom packages.
Only when you want to parse the schema with MIGX in MODX 3, the schema has to be in version="3.0".
We use MIGX CMP to add the custom database fields – so it is necessary
It’s a fresh installation, but this shouldn’t make a difference.
The MIGX code is the same for MODX 2.x and 3, and it runs the getRenderDirectories() function from the TV class (modTemplateVar) of the currently installed MODX version.
When i dump $renderDirectories in getRenderDirectories() i also get a wrong path. When dump $this->xpdo->getOption('processors_path') i get the old MODX 2.x path to the processors directory. So i looked in the config.inc.php and see that $modx_processors_path is wrong.
Changing $modx_processors_path = "core/src/Revolution/Processors/"; solved it.
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.