modxcms / Collections

An Extra for MODX Revolution that provides for Resource Collections managed by CollectionContainer Resources
GNU General Public License v2.0
53 stars 37 forks source link

Error while loading resource tree MODX 3 #335

Closed BertKooij closed 2 years ago

BertKooij commented 2 years ago

We experience an issue with some sites while testing an upgrade to MODX 3. After upgrading the resource tree stays empty. While refreshing with the network tools of the browser open I discovered that a request fails with a 500 error. First reported as https://github.com/modxcms/revolution/issues/15940.

Request that fails: POST {url}/connectors/index.php?action=Resource/GetNodes&id=web_0&type=MODX\Revolution\modContext

Status Code: 500 Internal Server Error

sortBy: menuindex currentResource: 0 currentAction: system/settings action: Resource/GetNodes node: web_0 HTTP_MODAUTH: xxxxx

Logfile:

[Fri Dec 17 15:48:19.226141 2021] [xxxx] AH01071: Got error 'PHP message: PHP Fatal error:  require_once(): Failed opening required '/home/.../core/model/modx/modprocessor.class.php' (include_path='.:/usr/local/php73/lib/php') in /home/.../core/components/collections/model/collections/collectioncontainer.class.php on line 3', referer: http://.../manager/?a=system/settings&query=debug

The resource tree does load after removing the first few lines from collectioncontainer.class.php. These line(s):

require_once MODX_CORE_PATH . 'model/modx/modprocessor.class.php';
require_once MODX_CORE_PATH . 'model/modx/processors/resource/create.class.php';
require_once MODX_CORE_PATH . 'model/modx/processors/resource/update.class.php';

https://github.com/modxcms/Collections/blob/master/core/components/collections/model/collections/collectioncontainer.class.php#L2-L4

Something else we discovered: after duplicating the context the resource tree for the new context is working. The original context still does not show resources. I've checked for differences between the two contexts but I couldn't find any.

Versions: MODX: 3.0.0-beta2 Collections 4.0.0-alpha

bYemma commented 2 years ago

Got the same problem with MODX 3.0.0-rc1 and Collections 4.0.0-alpha

[15-Jan-2022 18:18:01 Europe/Berlin] PHP Fatal error: require_once(): Failed opening required '/var/www/xxxx/htdocs/core/model/modx/modprocessor.class.php' (include_path='.:/opt/php-7.3/lib/php') in /var/www/xxxx/htdocs/core/components/collections/model/collections/collectioncontainer.class.php on line 2

Mark-H commented 2 years ago

It looks like this has been long fixed in the for-3 branch, however that has not been released yet and 4.0.0-alpha1 is actually quite old.

@theboxer Could you release an update now that 3.0.0-rc1 is available? I was gonna try and help fix this, but to my surprise it all seems to be working on my test site when using the git version. :-)

theboxer commented 2 years ago

new version is out. thanks for the ping :)

rthrash commented 2 years ago

This issue has been mentioned on MODX Community. There might be relevant details there:

https://community.modx.com/t/goodnews-status-update/2616/6