cedaro / satispress

Expose installed WordPress plugins and themes as Composer packages.
521 stars 51 forks source link

Critical Error with WP Amelia Plugin #205

Open timnolte opened 1 year ago

timnolte commented 1 year ago

When both SatisPress and the WP Amelia plugin are activated the entire site has a critical error and won't load. The following is in the error logs.

[30-Jun-2023 19:16:54 UTC] PHP Fatal error:  Uncaught TypeError: SatisPressProviderRequestHandler::__construct(): Argument #2 ($controllers) must be of type PsrContainerContainerInterface, PimplePsr11ServiceLocator given, called in /var/www/vhosts/satispress.www/releases/20230630145910/services/wordpress/public/wp-content/plugins/satispress/src/ServiceProvider.php on line 135 and defined in /var/www/vhosts/satispress.www/releases/20230630145910/services/wordpress/public/wp-content/plugins/satispress/src/Provider/RequestHandler.php:51
Stack trace:
#0 /var/www/vhosts/satispress.www/releases/20230630145910/services/wordpress/public/wp-content/plugins/satispress/src/ServiceProvider.php(135): SatisPressProviderRequestHandler->__construct(Object(SatisPressHTTPRequest), Object(PimplePsr11ServiceLocator))
#1 /var/www/vhosts/satispress.www/shared/services/wordpress/public/wp-content/plugins/ameliabooking/vendor/pimple/pimple/src/Pimple/Container.php(120): SatisPressServiceProvider->SatisPress{closure}(Object(SatisPressContainer))
#2 /var/www/vhosts/satispress.www/releases/20230630145910/services/wordpress/public/wp-content/plugins/satispress/src/Container.php(34): PimpleContainer->offsetGet('hooks.request_h...')
#3 /var/www/vhosts/satispress.www/releases/20230630145910/services/wordpress/public/wp-content/plugins/satispress/src/Plugin.php(48): SatisPressContainer->get('hooks.request_h...')
#4 /var/www/vhosts/satispress.www/releases/20230630145910/services/wordpress/public/wp/wp-includes/class-wp-hook.php(308): SatisPressPlugin->compose('')
#5 /var/www/vhosts/satispress.www/releases/20230630145910/services/wordpress/public/wp/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
#6 /var/www/vhosts/satispress.www/releases/20230630145910/services/wordpress/public/wp/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#7 /var/www/vhosts/satispress.www/releases/20230630145910/services/wordpress/public/wp/wp-settings.php(486): do_action('plugins_loaded')
#8 /var/www/vhosts/satispress.www/releases/20230630145910/services/wordpress/public/wp-config.php(239): require_once('/var/www/vhosts...')
#9 /var/www/vhosts/satispress.www/releases/20230630145910/services/wordpress/public/wp/wp-load.php(55): require_once('/var/www/vhosts...')
#10 /var/www/vhosts/satispress.www/releases/20230630145910/services/wordpress/public/wp/wp-admin/admin.php(34): require_once('/var/www/vhosts...')
#11 /var/www/vhosts/satispress.www/releases/20230630145910/services/wordpress/public/wp/wp-admin/plugins.php(10): require_once('/var/www/vhosts...')
#12 {main}
  thrown in /var/www/vhosts/satispress.www/releases/20230630145910/services/wordpress/public/wp-content/plugins/satispress/src/Provider/RequestHandler.php on line 51

SatisPress Version: 1.0.4 WP Amelia Version: All Versions (https://wpamelia.com/)

timnolte commented 1 year ago

After further testing this appears to be an issue when using a Composer-based WordPress installation, like Roots Bedrock, most likely due to the autoloader that is used by the site. Additionally, we install SatisPress itself via Composer along with WordPress.