Skip to content
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

shortcode-core breaks entire grav install?? #14

Closed
4evermaat opened this issue Apr 9, 2016 · 5 comments
Closed

shortcode-core breaks entire grav install?? #14

4evermaat opened this issue Apr 9, 2016 · 5 comments

Comments

@4evermaat
Copy link

getgrav/grav-plugin-admin#487

I will copy it here:

It seems like it is gravstrap plugin, but I could be wrong. I don't remember changing anything that caused this break, but is it possible that I deleted a line or something and accidentally broke something. Anyway, the error message is:

Whoops\Exception\ErrorException thrown with message "Argument 1 passed to Grav\Plugin\ShortcodeManager::getId() must implement interface Thunder\Shortcode\Shortcode\ShortcodeInterface, null given, called in
C:\wamp\www\grav\user\plugins\gravstrap\classes\Base\GravstrapShortcode.php on line 204 and defined"

Stacktrace:
#27 Whoops\Exception\ErrorException in C:\wamp\www\grav\user\plugins\shortcode-core\classes\ShortcodeManager.php:264
#26 Whoops\Run:handleError in C:\wamp\www\grav\user\plugins\shortcode-core\classes\ShortcodeManager.php:264
#25 Grav\Plugin\ShortcodeManager:getId in C:\wamp\www\grav\user\plugins\gravstrap\classes\Base\GravstrapShortcode.php:204
#24 Grav\Plugin\Shortcodes\GravstrapShortcode:registerOutput in C:\wamp\www\grav\user\plugins\gravstrap\shortcodes\Basic\GravstrapSectionShortcode.php:67
#23 Grav\Plugin\Shortcodes\GravstrapSectionShortcode:renderOutput in C:\wamp\www\grav\user\plugins\gravstrap\classes\Base\GravstrapShortcode.php:65
#22 Grav\Plugin\Shortcodes\GravstrapShortcode:Grav\Plugin\Shortcodes\{closure} in C:\wamp\www\grav\user\plugins\shortcode-core\vendor\thunderer\shortcode\src\Processor\Processor.php:134
#21 call_user_func_array in C:\wamp\www\grav\user\plugins\shortcode-core\vendor\thunderer\shortcode\src\Processor\Processor.php:134
#20 Thunder\Shortcode\Processor\Processor:processHandler in C:\wamp\www\grav\user\plugins\shortcode-core\vendor\thunderer\shortcode\src\Processor\Processor.php:93
#19 Thunder\Shortcode\Processor\Processor:processIteration in C:\wamp\www\grav\user\plugins\shortcode-core\vendor\thunderer\shortcode\src\Processor\Processor.php:53
#18 Thunder\Shortcode\Processor\Processor:process in C:\wamp\www\grav\user\plugins\shortcode-core\classes\ShortcodeManager.php:228
#17 Grav\Plugin\ShortcodeManager:processContent in C:\wamp\www\grav\user\plugins\shortcode-core\shortcode-core.php:90
#16 Grav\Plugin\ShortcodeCorePlugin:onPageContentProcessed in C:\wamp\www\grav\vendor\symfony\event-dispatcher\EventDispatcher.php:181
#15 call_user_func in C:\wamp\www\grav\vendor\symfony\event-dispatcher\EventDispatcher.php:181
#14 Symfony\Component\EventDispatcher\EventDispatcher:doDispatch in C:\wamp\www\grav\vendor\symfony\event-dispatcher\EventDispatcher.php:46
#13 Symfony\Component\EventDispatcher\EventDispatcher:dispatch in C:\wamp\www\grav\vendor\rockettheme\toolbox\Event\src\EventDispatcher.php:23
#12 RocketTheme\Toolbox\Event\EventDispatcher:dispatch in C:\wamp\www\grav\system\src\Grav\Common\Grav.php:449
#11 Grav\Common\Grav:fireEvent in C:\wamp\www\grav\system\src\Grav\Common\Page\Page.php:561
#10 Grav\Common\Page\Page:content in C:\wamp\www\grav\user\plugins\gravstrap\gravstrap.php:89
#9 Grav\Plugin\GravstrapPlugin:onTwigSiteVariables in C:\wamp\www\grav\vendor\symfony\event-dispatcher\EventDispatcher.php:181
#8 call_user_func in C:\wamp\www\grav\vendor\symfony\event-dispatcher\EventDispatcher.php:181
#7 Symfony\Component\EventDispatcher\EventDispatcher:doDispatch in C:\wamp\www\grav\vendor\symfony\event-dispatcher\EventDispatcher.php:46
#6 Symfony\Component\EventDispatcher\EventDispatcher:dispatch in C:\wamp\www\grav\vendor\rockettheme\toolbox\Event\src\EventDispatcher.php:23
#5 RocketTheme\Toolbox\Event\EventDispatcher:dispatch in C:\wamp\www\grav\system\src\Grav\Common\Grav.php:449
#4 Grav\Common\Grav:fireEvent in C:\wamp\www\grav\system\src\Grav\Common\Twig\Twig.php:310
#3 Grav\Common\Twig\Twig:processSite in C:\wamp\www\grav\system\src\Grav\Common\Grav.php:186
#2 Grav\Common\Grav:Grav\Common\{closure} in C:\wamp\www\grav\vendor\pimple\pimple\src\Pimple\Container.php:113
#1 Pimple\Container:offsetGet in C:\wamp\www\grav\system\src\Grav\Common\Grav.php:288
#0 Grav\Common\Grav:process in C:\wamp\www\grav\index.php:38

All grav pages in this install are giving me this error in web browser
I think it is odd that the admin plugin got the same error (admin should work if all else fails unless the php server itself is down). So that implies that one plugin (not the admin plugin) had the ability to break the functions of other plugins with pages that have nothing to do with that plugin.

https://www.dropbox.com/s/mp29bf042o24ypb/gravstrap%20plugin%20bad.zip?dl=1

Let me know if you need more files. I can zip/upload the entire grav install if needed to help reproduce the problem.
Github has issues with their uploader and zip files.

@4evermaat 4evermaat changed the title gravstrap breaks entire grav install?? #11 shortcode-core breaks entire grav install?? Apr 9, 2016
@rhukster
Copy link
Member

rhukster commented Apr 9, 2016

I think you just have a sync error between GravStrap plugin and the ShortcodeCore plugin. Both should be up to date. This is not really an issue with ShortCode plugin itself.

BTW, with any PHP fatal error, processing stops no matter what, this is normal behavior. Fatal means die immediately and stop all further processing.

@rhukster rhukster closed this as completed Apr 9, 2016
@4evermaat
Copy link
Author

the thing is that i have a separate install of grav with gravstrap and it is up to date. No problems.

I tried copying the plugin from the 'good' grav to the 'broken' grav and I still get the error. So wtf?

I ended up just deleting and replacing the grav install. works fine. I just had to replace the demo pages with my custom pages and re-tweak some theme files. but we're there. i'll continue to watch and see what happens.

I will try to make backups more often. i wish the backups were more automated.

@rhukster
Copy link
Member

Well I don't know. I do know that the Gravstrap plugin is sending a null to the getId() method of ShortcodeCore, and that is throwing the error.

The problem lies in the GravStrap plugin, and as I didn't write that plugin i'm going to hand off responsibility to the author of it. I suggest you take this up with @giansi on the issue you created over there: giansi/gravstrap#11

@4evermaat
Copy link
Author

Do you have any suggestions as to an alternative method to call getID(). I understand that it is not your code, but any additional suggestions can be helpful.

@rhukster
Copy link
Member

rhukster commented Feb 1, 2019

found the main issue: getgrav/grav-plugin-shortcode-ui#29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants