-
Notifications
You must be signed in to change notification settings - Fork 32
Description
We're using thunderer/shortcode in our Grav CMS shortcode-core plugin: https://github.com/getgrav/grav-plugin-shortcode-core
And it was reported to me that while using also using the Gantry5 Plugin while Shortcode Core was active, resulted in an infinite loop bug. I dug into this a bit and it appears that some HTML code output by the plugin causes this PHP infinite loop bug when using the RegularParser. It works fine with the RegexParser or WordpressParser BTW.
I have created a little test project where I'm using JUST the thunderer/shortcode library and the sample content in question, and it's definitely repeatable even out of the context of Grav and the Shortcode Core plugin.
In this file, you can see the HTML that is causing the issue in question. I've tried 'cleaning' the HTML, but that does not change the results.
My hunch is that it's the HTML data attributes that are throwing the parser for a loop:
...
<li>
<a
data-g5-ajaxify
data-g5-ajaxify-target="[data-g5-content]"
href="/testing/grav-g5/admin/gantry/positions?nonce=85998f180935f47b4b01ad293ac1325c"
><i class="fa fa-fw fa-object-group" aria-hidden="true"></i>
Positions</a
>
</li>
<li>
<a
data-g5-ajaxify
data-g5-ajaxify-target="[data-g5-content]"
href="/testing/grav-g5/admin/gantry/menu?nonce=85998f180935f47b4b01ad293ac1325c"
><i class="fa fa-fw fa-bars" aria-hidden="true"></i>
<span>Menu</span></a
>
</li>
...I'm inclined to disable the Grav Shotcode Core while Gantry5 plugin is processing, as it's really not being used here, it's just that Grav is processing ALL page content for potential shortcodes.