Closed hassanmah closed 2 years ago
What are you rending on the pages when you get this error? Any chance there's a twig error on those pages?
Probably a Yii2 issue? https://github.com/yiisoft/yii2-debug/issues/491
@brianjhanson just a Neo field
I've got the exact same issue, but then with SuperTable. I also tried debugging it, but it's very difficult to pinpoint. Commented out all renderings and simply looping over the matrix field gave me the error.
Thanks for the info! I happened to run into this while working on a totally separate ticket, but also wasn't able to completely track it down. I was using a Vizy field and it seemed to be somewhat related to referencing a handle that wasn't present on a block type. I'd see a totally blank page (no errors in the logs) and the debug bar would show the same errors.
It seems like all of us are using more "complex" fields (Neo, Super Table, Vizy) so I wonder if it has something to do with that. I'll dig around a bit more, but I have a feeling @angrybrad is right and this is better fixed in Yii2.
I kind of figured it out for me. I'm using the Typed Link Field plugin. If I remove all of the instances of that field from my Matrix Field the error disappears. After re-adding the Typed Link fields one by one the error didn't return. Bit of a weird bug, but I think I had some misconfiguration in one of the Typed Link fields...
I found the error by trying to clone the Matrix Field that gave me the error using the Field Manager plugin. I wanted to clone it to see if "just a new instance" of the Matrix Field would solve the issue. But I ran into an error that pointed me to the Typed Link field instead.
I'm still having trouble replicating this consistently. If anyone has some consistent steps to reproduce that would be great.
Based on the stack trace it looks like in some situations an instance of ExceptionEvent
is getting created with an instance of yii\debug\FlattenException
which isn't compatible with the $exception
property there. I'm guessing this has something to do with a plugin, but I've had trouble replicating it consistently.
The fix was way easier for me than I initially thought ... I had a custom module that wasn't up to date with Craft's coding guidelines. After fixing the module everything worked fine again 😅 Do you have any custom modules/plugins? @hassanmah
Glad you got it sorted out! I'm going to close this for now, but @hassanmah feel free to reopen if you're still running into issues.
@daafbleumink sorry for the reply, I do have a custom module, which I deletes the folder for, but seems like it's still in composer.json
Do I need to run anything to remove it from composer.json?
Thanks
@hassanmah If you're deleting the module, you'll want to manually remove the autoload
config for your module from composer.json
and then run composer dump-autoload -a
.
@hassanmah I think manually removing the entry from your composer.json, then running composer install
+ composer dump-autoload
should work 🤔
@daafbleumink that's not fixed it, but looking at the comments, I do have Typed Link Field plugin installed too.
I had this issue lately and I couldn't figure it out. I had used Typed Link Field before but since had migrated to Hyper from verbb and removed it. I also have a module, but it was existing prior to the issue.
The thing that fixed it is restoring an old (but unused since 2 weeks ago) route in config/route.php. It was pointing to a controller in the module, but the route and controller were removed since a while ago. Restoring the route, refreshing the page, it worked... then I could remove the route again and it continued to work. Why the hell? I have no idea. 😂 It's as if an old cache pointing the route and controller together were failing when I was trying to access routes from debugbar...
What happened?
Description
On some pages, I get errors when using the debug bar on all tabs
On Events and DB
On Request:
Steps to reproduce
Expected behavior
Actual behavior
Craft CMS version
4.2.5.1
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
-