You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Latest Pages block on an article page, and selecting parent article landing page as source, if the current article page is in the listed latest pages, it crashes. The article landing page is also crashing.
Steps to reproduce
Steps to reproduce the behavior:
On an article page, use the Latest Pages block
Select parent page of current article as source
Select any number of pages to list, making sure the current page will be listed with the ordering specified in the parent’s LAYOUT tab.
RecursionError
Expected behavior
It should list all latest pages, including or excluding the current page.
The text was updated successfully, but these errors were encountered:
Yes, this is a known bug. Thanks for reporting it with detailed steps to reproduce.
I'm not sure on the best way to solve this. One way would be to not allow selecting an ancestor of the current page in the latest pages block. Open to suggestions or a pull request if you have any ideas. Regardless, there should be better documentation with a warning about this behavior!
Excluding the current page is not enough. If you select an ancestor (say a blog landing page) that page could render the sub-pages on it, as part of its content. Which then must load the current page in order to render the blog landing page. So there is simply no way to guarantee there won't be recursion - each page could be totally different based on what content the developer has put on it.
It's not just limited to ancestors. Say we have a Home Page which has two children, A and B. If A has a preview or latest pages of B, that will work. But if B also tries to do a preview or latest pages of A, you now have a recursion problem.
Describe the bug
When using Latest Pages block on an article page, and selecting parent article landing page as source, if the current article page is in the listed latest pages, it crashes. The article landing page is also crashing.
Steps to reproduce
Steps to reproduce the behavior:
Expected behavior
It should list all latest pages, including or excluding the current page.
The text was updated successfully, but these errors were encountered: