Cannot get the children of first layer block when viewing the frontend of a revision #975
Labels
bug report status: unconfirmed
A bug report that has not yet been reproduced by the maintainer(s), and more information is required
bug report
Bug Description
Hi all,
I am using Neo to create a two level looping content list. The content structure is something like this. There are multiple
"testParent" blocks which can contain multiple "testChildren" blocks.
The frontend template of this entry is something like this for debug.
And everything is fine. The first dump function is printing the list of level 1 "testParent" block. The second dump function is printing the list of level 2 "testChildren" blocks of each "testParent" Block. And the third dump function is printing all the block without considering the level and there is three blocks in total.
But when switching to one of the previous revision, the cms page can still show the correct blocks with the correct structure. For ruling out other factors, the difference between two version is just the text in the text field but no action on the block structure.
When we view the frontend with the same template by clicking the "View" button at the top right corner of the panel,
the second dump function is printing an empty array which means we cannot get the level 2 "testChildren" blocks of each "testParent" block by the function item.children.all(). I have tried to study the reasons behind but only find that the relations between blocks in different level are lost in revision. Whatever I use .children for level 1 blocks or use .parent for level 2 blocks, I can't get anything. Do anyone have any idea about this case.
Steps to reproduce
Expected behaviour
Able to query the second level blocks from the first level blocks.
Neo version
5.2.20
Craft CMS version
5.4.9
What is the affected Neo field's propagation method?
No response
Does this issue involve templating, and if so, is eager-loading used?
This is a templating issue, and eager loading is not used
The text was updated successfully, but these errors were encountered: