grav-plugin-shortcode-core icon indicating copy to clipboard operation
grav-plugin-shortcode-core copied to clipboard

Shortcode update creating copies of itself

Open danjames68 opened this issue 4 years ago • 3 comments

I updated the shortcode plugin after the most recent update and it immediately threw an error - I found clones of all the files in the plugin folder, all called 'xxx 2.php' where 'xxx' is the file name. I assumed the update had gone wrong and threw out all the doubled files (which included non PHP files - js, readme.md, map, etc).

Reloaded and it has worked for five minutes before throwing the same error again, so I'm assuming it's generating these files itself.

danjames68 avatar Mar 12 '21 16:03 danjames68

commenting out the line on 116: $this->shortcodes->resetObjects(); // clear shortcodes that may have been processed in this execution thread before seems to be a temporary fix.

danjames68 avatar Mar 12 '21 16:03 danjames68

This was a recent commit in the latest release. I've not run into any issues myself.

What is the error you get?

rhukster avatar Mar 12 '21 20:03 rhukster

Hi Andy, as soon as I updated it threw an error: Cannot declare class Grav\Plugin\Shortcodes\Shortcode, because the name is already in use

I turned it off and had a look today and found copies of all the files in all the folders. So for example in 'classes > plugin' I found Shortcode.php and Shortcode 2.php - and the same for most of the files - all the js, json, repeated. No idea why.

If you can't think of an obvious problem maybe I should remove and reinstall - but I think it means I have to remove the upstream plugins too?

Grav v1.7.7 - Admin v1.10.6. Theme is a copy of Typhoon

danjames68 avatar Mar 12 '21 21:03 danjames68