-
Notifications
You must be signed in to change notification settings - Fork 0
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
[bw_pages] - Infinite recursion processing post content #166
Comments
In order to make sense of the output I added
Posts A and C also contained a bw_list shortcode, that creates the simple list of posts: eg B C D for A and A B D for C.
|
Scenario 3 - 3 pages with the same shortcodeThe screenshots above showed the output when the queries were limited to 3 posts. I added post E the similar to A and C,
Note: Use of
The new function
|
We should still test what happens when the |
There's a new block in the Gutenberg plugin called
post-content
. I've discovered multiple ways of causing Gutenberg to go into an infinitely recursive loop. While trying to reason what the output should be when recursion is detected, I created a test case using the[bw_pages]
shortcode which was equivalent to the scenario I'd tried using FSE. Two pages that would recursively embed each other ad infinitum.Imagine my surprise when I discovered that my shortcode suffered the same problem.
Steps to reproduce
Details
In order to create a display that's a bit more understandable I decided it might be easier to
create 4 pages to be used in the test scenario.
A and C contain the problematic shortcode.
B and D are just for a bit of padding.
[bw_pages]
shortcode[bw_pages]
shortcodeExpected output
Note: Both
[bw_pages]
andcore/post-content
attempt to prevent the recursion by excluding themselves from the result set.When the shortcode's
format
parameter doesn't includeC
- for Content - then the problem shouldn't occur.Try this with
E
for Excerpt.When viewing A, with format="T e / C" the processing should be:
[bw_pages]
which returns B, C and D[bw_pages]
returns A, B and DHere's the screen capture for A
And here's the screen capture for C
Additional notes
I added another line of code into the
bw_pages()
function that prevents double expansion of the top level post.The text was updated successfully, but these errors were encountered: