Nebulius / grav-plugin-static-social-embeds

Grav plugin to embed social status (like tweets, instagram posts, toots, etc.) in articles without using their embed iframe, but rather statically without any dependency to the service.
MIT License
13 stars 2 forks source link

Class 'Grav\Plugin\Shortcodes\Shortcode' not found #4

Closed mahagr closed 4 years ago

mahagr commented 4 years ago

The plugin loads a class needing shortcode before shortcode plugin gets initialized:

https://github.com/Nebulius/grav-plugin-static-social-embeds/blob/master/static-social-embeds.php#L26-L27

mahagr commented 4 years ago

Actually it's even worse, in CLI plugins are not initialized by default, which means that the Shortcode class will never be there.

funilrys commented 4 years ago

@mahagr Can you review my patch when you have a little bit of time?

I know it's working (tested on stagging, prod and a fresh install) but a quick review from an expert in Grav might be better.

Thanks (again) for your time!

Cheers!

mahagr commented 4 years ago

Added comments