bobbingwide / oik-loader

WordPress Must Use plugin to load required plugins
0 stars 0 forks source link

Fatal error attempting to load a plugin where it's already loaded by a different name #11

Closed bobbingwide closed 3 years ago

bobbingwide commented 3 years ago

In blocks.wp.a2z I've switched to using gutenberg-source to use the latest code. When oik-loader tests to see if the plugin's already loaded it appears not to be, so it add this to the list of plugins to load. It then fails with the following message:

Fatal error: Cannot redeclare gutenberg_menu() 
(previously declared in C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg-source\gutenberg.php:29) 
in C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\gutenberg.php on line 29

Workaround

bobbingwide commented 3 years ago

For FSE themes prior to inclusion in WordPress core, Gutenberg needs to be activated by default. Therefore, it should be OK to change the oik loader MU logic to ignore plugins starting gutenberg. I'm currently using: