-
Notifications
You must be signed in to change notification settings - Fork 20
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
Modular pages share shortcodes #87
Comments
k8n
added a commit
to k8n/grav-plugin-shortcode-core
that referenced
this issue
Feb 8, 2021
A workaround suggested in getgrav#87. Likely addresses getgrav#96 and getgrav#97 as well.
k8n
added a commit
to k8n/grav-plugin-shortcode-core
that referenced
this issue
Feb 8, 2021
A workaround suggested in getgrav#87. Likely addresses getgrav#96 and getgrav#97 as well.
rhukster
pushed a commit
that referenced
this issue
Mar 10, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I'm having trouble with modular pages, I have a bunch of modular pages with some [sections]. Each modular (sub)page contains a section with the same name.
The problem is that the shortcodes are added to the ShortcodeManager instance per request and are not cleared. That means that my three modular pages that each have a section [section name=first] all share the "first" section of the modular page that gets parsed first.
I suggest clearing the objects array before/after the processing of a (modular) page. For me adding
$this->shortcodes->resetObjects()
at the beginning of the processShortCodes function inshortcode-core.php
works. But this breaks pages that also require rawHandlers (I don't).The text was updated successfully, but these errors were encountered: