Open mikesnoeren opened 3 weeks ago
Similar to https://github.com/verbb/kint/issues/8 what's the reason for dumping an ElementQuery as opposed to a single or collection of Element objects?
I'll look into this, as it's probably the eager-loading changes in Craft 5 that are causing this, but it might mean we need to fork and maintain our own kint-twig package.
Similar to #8 what's the reason for dumping an ElementQuery as opposed to a single or collection of Element objects?
In this specific project, we're building a filter that updates an element query, in order to debug this, it's nice to have Kint available to see all options in the element query.
Ah, gotcha, good to know! So yep, it looks like the auto eager-loading Craft does is really messing this up, providing an infinite loop of elements. I think the depth setting in supposed to handle this, but maybe that's not quite working.
Even with that set to 1
, the page just crashes. So I think something else is going on here.
If you require any further information please let me know!
Yeah, I'm in agreement that it's not working. Looking into it...
I wanted to follow up on this issue and ask if there has been any progress. This issue is currently blocking our workflow, so any updates would be greatly appreciated.
I've just done some further testing on this, if you'd like to give my latest changes a go? To get this early, run composer require verbb/kint:"dev-craft-5 as 4.0.0"
.
I've just done some further testing on this, if you'd like to give my latest changes a go? To get this early, run
composer require verbb/kint:"dev-craft-5 as 4.0.0"
.
Everything seems to be working fine again! Thanks a lot!
Describe the bug
When executing
{{ d(craft.entries) }}
, we encounter a PHP error 500.In Craft 4, we could execute partial queries like the example above to explore available methods associated with the
craft.entries
property. However, attempting this in Craft 5 leads to the PHP error detailed below:Observations:
depth_limit
setting to 1, the error persists.Steps to reproduce
{{ d(craft.entries) }}
to any templateCraft CMS version
5.1.10
Plugin version
4.0.0
Multi-site?
No
Additional context
No response