Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relations field breaking admin on multisite #31

Closed
justinholtweb opened this issue Jan 25, 2024 · 4 comments
Closed

Relations field breaking admin on multisite #31

justinholtweb opened this issue Jan 25, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@justinholtweb
Copy link

PHP version | 8.2.0
Craft edition & version | Craft Pro 4.7.0
Asset Usage | 3.2.0

In a Craft multisite install, occasionally entries in the admin will get an error when trying to render the data from the Relations field type when present. It doesn't happen all the time, but when it does it breaks the entry editing and page formatting heavily.

Error: Call to a member function setTimezone() on bool in /home/forge/rogc.websitepreview.dev/vendor/internetztube/craft-element-relations/src/controllers/ElementRelationsController.php:29 Stack trace: #0 [internal function]: internetztube\elementRelations\controllers\ElementRelationsController->actionGetByElementId() #1 /home/forge/rogc.websitepreview.dev/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array() #2 /home/forge/rogc.websitepreview.dev/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams() #3 /home/forge/rogc.websitepreview.dev/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction() #4 /home/forge/rogc.websitepreview.dev/vendor/craftcms/cms/src/web/Application.php(305): yii\base\Module->runAction() #5 /home/forge/rogc.websitepreview.dev/vendor/craftcms/cms/src/web/Application.php(606): craft\web\Application->runAction() #6 /home/forge/rogc.websitepreview.dev/vendor/craftcms/cms/src/web/Application.php(284): craft\web\Application->_processActionRequest() #7 /home/forge/rogc.websitepreview.dev/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest() #8 /home/forge/rogc.websitepreview.dev/web/index.php(12): yii\base\Application->run() #9 {main}

Screen Shot 2024-01-25 at 10 57 08 AM

@internetztube
Copy link
Owner

Thanks for Reporting! I'll take a look ASAP!

@justinholtweb
Copy link
Author

@internetztube thank you. We are still in dev on the site so we haven't purchased the license for the plugin yet but will be in the next week or so before launch.

Note, I use this plugin on pretty much all the sites I have developed over the last year and this only looks to have happened on this multisite one. Its a very very handy plugin so thank you a bunch for developing and maintaining.

internetztube added a commit that referenced this issue Jan 26, 2024
@internetztube
Copy link
Owner

I fixed this particular exception, but I'll need to do some more work on preventing those errors. I'll move this whole relation gathering onto the queue to make things more robust.
Could you check if this fix solves your issue? Thanks!

@internetztube
Copy link
Owner

This should be fixed with the latest release. Thank you!

@internetztube internetztube added the bug Something isn't working label Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants