getgrav / getgrav/grav-plugin-shortcode-core
Random code injected when using custom path for shortcodes
- Dominant language
- PHP
- Stars
- 47
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
I've recently setup a custom path in Shortcodes-core for some shortcodes that came bundled with a theme (HotDoy) so I followed the example path given and added them here: `/user/custom/shortcodes/`
Upon saving I get the following injected into the header of EVERY page including the admin backend and front end:
`Fetch Failed: Bud1 tled funtitled folderIlocblob;(������untitled folderlg1Scompuntitled foldermoDDblob�t��Auntitled foldermodDblob�t��Auntitled folderph1ScompVimeoShortcode.phpIlocblobI�������� @� @� @� @E DSDB `� @� @� @{"status":"success","payload":{"resources":{"total":0,"plugins":[],"themes":[]},"grav":{"isUpdatable":false,"assets":{"grav-admin":{"name":"grav-admin-v1.6.21.zip","type":"application\/octet-stream","size":10976381,"download":"https:\/\/getgrav.org\/download\/core\/grav-admin\/1.6.21"},"grav-update":{"name":"grav-update-v1.6.21.zip","type":"application\/octet-stream","size":4097491,"download":"https:\/\/getgrav.org\/download\/core\/grav-update\/1.6.21"},"grav":{"name":"grav-v1.6.21.zip","type":"application\/octet-stream","size":6265610,"download":"https:\/\/getgrav.org\/download\/core\/grav\/1.6.21"}},"version":"1.6.21","available":"1.6.21","date":"2020-02-12T00:17:52Z","isSymlink":false},"installed":29,"flushed":false}}`
If I remove the path or turn off Shortcode-Core the issue goes away.
I'm running the latest shortcode-core version (4.2.1) and latest Grav (Grav v1.6.21 - Admin v1.9.12)
Sorry won't let me format the error as code.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue in Shortcode-Core with the custom shortcode path `/user/custom/shortcodes/` on Grav v1.6.21 and Shortcode-Core 4.2.1. Trace the custom-path handling and the response that injects data into both admin and frontend pages; done means saving with that path no longer injects the fetch-failure or Grav JSON output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100