-
Notifications
You must be signed in to change notification settings - Fork 642
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
Eager loading asset transforms doesn't work (with potential fix) #4931
Comments
Thanks for reporting that! I’ve just fixed it for the next release. To get the fix early, change your "require": {
"craftcms/cms": "dev-develop#a6be2dc6349cdfd829a46b216f38d47a304ecca1 as 3.3.3",
"...": "..."
} Then run |
Wow, that was fast! Thanks, it's working! |
I'm trying to debug some problems we're having with eager loading image transforms and came across this issue. It seems like the fix here was reverted at some point. Now it looks to me like because of this
|
Can confirm - it no longer works in 3.5.16 :( |
Description
I try to eager load asset transforms in a matrix and with or without the eager loading, the number of queries stay the same.
I checked in the code and in the method
eagerLoadElements
ofElements.php
line1694
, the asset query is executed withasArray
. In the methodpopulate
ofAssetQuery.php
, thewithTransforms
is skipped ifasArray
istrue
. So, if I commentasArray()
inElements.php
, it's now working as intended.Update: It seems the the culprit is this commit from 14 days ago:
ec292df#diff-a23f034d2592a363d6ae402cff459928
Steps to reproduce
withTransforms
Additional info
The text was updated successfully, but these errors were encountered: