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
[4.2] Getting unknown property: craft\commerce\elements\db\VariantQuery::hasSales #471
Comments
Can you please post the full error stack trace? It'll appear with |
Absolutely, sorry!
|
That's strange. The |
Yeah, it does exist. |
Ok thanks, I'll do some testing and let you know what I find. |
So it turns out that Commerce unsets the I've added a workaround for this in 10f06d0, for the next release. |
Just released in version 4.3.0. |
Perfect, thank you for the blitz-like fix! Works like a charm now. :) |
I'm currently playing with integrating Blitz into a Craft Commerce install and stumbled upon this.
We have a page that lists all variants/products on sale, we utilize something akin to this query in Twig:
{{ craft.variants.hasSales(true).one().title }}
which works fine without Blitz enabled. But when I enable Blitz caching for this page I get an unknown property exception. Since it works when Blitz is disabled, I assume the problem lies with the Blitz plugin?
Reproduce:
Using:
Craft Pro 4.3.7.1
Commerce 4.2.5.1
Blitz 4.2.3
The text was updated successfully, but these errors were encountered: