-
☆ A M B ☆
- 450 Posts
I upgraded from 2.1.3 to 2.2.5 last Friday, and I'm having trouble saving certain resources. They are what I call "Site Definition" resources - parent resources that use a template with a bunch of extra TVs, the values of which get inherited by other child resources within that particular subsite.
I'm thinking this is probably a permissions problem and a change between how permissions worked under 2.1 vs. 2.2.x. Some of these TVs are in element groups that only certain usergroups/roles can access. However, I can't even save these resources with an Admin user.
When I try to save these resources, I get the endless save screen, which doesn't go away until I refresh the page.
I get the following series of warnings/errors in my PHP log:
PHP Warning: Illegal offset type in isset or empty in /core/model/modx/moduser.class.php on line 508, referer: /manager/index.php?a=30&id=1547
PHP Warning: Illegal offset type in isset or empty in /core/model/modx/moduser.class.php on line 159, referer: /manager/index.php?a=30&id=1547
PHP Warning: Illegal offset type in /core/model/modx/moduser.class.php on line 160, referer: /manager/index.php?a=30&id=1547
PHP Warning: Illegal offset type in /core/model/modx/moduser.class.php on line 164, referer: /manager/index.php?a=30&id=1547
PHP Warning: Illegal offset type in isset or empty in /core/model/modx/modx.class.php on line 1877, referer: /manager/index.php?a=30&id=1547
PHP Fatal error: Call to a member function execute() on a non-object in /core/xpdo/om/xpdoobject.class.php on line 236, referer:/manager/index.php?a=30&id=1547
These illegal offset warnings seem to have to do with the fact that arrays/objects are used as keys in these core files. However, I don't get those warnings when saving other resources.
I'm taking a wild guess that the fatal error is related to my inability to save these resources. But I'm not sure how to begin troubleshooting.
-
☆ A M B ☆
- 450 Posts
I figured out that there are 2 problematic TVs that prevent resources from saving when they are present in the template. One is called 'primaryResourceGroup', and it specifies a resource group which all child resources inherit via a plugin. The other is 'ElementGroup', and it specifies an element group for the subsite.
For each of these the TV inputs get populated from a snippet, and the output is just text (an ID number of an element group or resource group). But when either of these is present in a template, I cannot save the resource and I get the above string of warnings ending in a Fatal Error.
I think that there have been some updates with how 'this' for example is referenced with TVs. I'll try and get more info but maybe they are related. Are these custom TV types?
jpdevries
-
☆ A M B ☆
- 450 Posts
They are single-select list boxes that populate via an @EVAL API call to runSnippet. And the output value is the ID of a resource group or element group, the output format is text. So, nothing much special going on.
One of them was in a restricted group, and I thought maybe that was the problem so I took it out of the group, but that didn't make a difference.
I also thought maybe a plugin was causing the problem, so I disabled every one that potentially could have been, but it didn't make a difference.
-
☆ A M B ☆
- 450 Posts
Thanks Jason. That was exactly my problem. I fixed those lines as indicated, and I'm back in business!