Open raptureaid opened 5 years ago
Hey @raptureaid have you had any luck getting this to work?
My guess is because there's some issue with how matrix block types are getting interpreted here, but since you're doing .all()
I believe those should be taken care of before the grid field starts. I can take a look anyway, but I wanted to check in with you first.
No, I was able to get a prototype of the pages working on a staging machine, but could not figure out how to get the matrix fields to correctly eager-load (which could totally be user error on my end).
I might be missing something, but when trying to eager load matrix blocks I run into the following error:
Impossible to access a key ("blockType:assetsField") on a null variable.
Following the documentation from Craft for eager loading and Grid, my template looks like so:
I've intentionally replaced my field labels with generic labels to make it easier to follow along.
If I remove the
.with[]
statement, the grid loads correctly minus the benefits of eager loading.