-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue around "Class 'Grav\Plugin\Shortcodes\Shortcode' not found".
This patch fixes #4. Context: Before this patch (after 4.2.0 of shortcode-core), I could not run Grav (bin/grav and webserver) anymore. Indeed, I got "Class 'Grav\Plugin\Shortcodes\Shortcode' not found" as error and asked for help on the discord server of the Grav Core Team. @mahagr & @rhukster tried to help me with a patch+release (shortcode-core 4.2.1) but it still did not solve the issue. So I decided to fix it myself. Resolution: I first followed the new structure by moving the shortcodes classes inside the `classes` directory. Same for `classes/SSEShortcode.php` which I moved to `classes/plugin/SSEShortcode.php`. In the `static-social-embeds.php` file, I just fixed the autoloader. In particularly the `getSubscribedEvents()` method. From now, `classes/plugin/SSEShortcode.php` is only loaded when we are not in the admin section. After, applying and testing those changes, onto my fresh development environment (latest grav-admin+docker-compose), everything worked back properly.
- Loading branch information
Showing
5 changed files
with
22 additions
and
12 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters