grrr-amsterdam / simply-static-deploy

WordPress plugin to deploy static sites easily to an AWS S3 bucket.
MIT License
68 stars 11 forks source link

500 Error on multisite WP when activate plugin #33

Closed JuliaUsanova closed 3 years ago

JuliaUsanova commented 4 years ago

PHP Version: 7.3 WordPress Version: 5.4.1

I get 500 error when activating the plugin through network admin. In the hosting logs there is:

PHP Fatal error:  Uncaught Error: Class 'Grrr\SimplyStaticDeploy\SimplyStaticDeploy' not found in /nas/content/live/cooplenlprod/wp-content/plugins/simply-static-deploy/simply-static-deploy.php:25

Stack trace:

#0 /nas/content/live/cooplenlprod/wp-settings.php(319): include_once()
#1 /nas/content/live/cooplenlprod/wp-config.php(162): require_once('/nas/content/li...')
#2 /nas/content/live/cooplenlprod/wp-load.php(37): require_once('/nas/content/li...')
#3 /nas/content/live/cooplenlprod/wp-blog-header.php(13): require_once('/nas/content/li...')
#4 /nas/content/live/cooplenlprod/index.php(17): require('/nas/content/li...')
#5 {main}
  thrown in /nas/content/live/cooplenlprod/wp-content/plugins/simply-static-deploy/simply-static-deploy.php on line 25

To ensure autoload.php is present:

Screen Shot 2020-05-20 at 21 09 15

autoloader.php content:

<?php

// autoload.php @generated by Composer

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInitced33dc59fcf74571589a736783f57db::getLoader();

wp-config.php

Screen Shot 2020-05-21 at 13 23 24
JuliaUsanova commented 4 years ago

Also tried to activate it on the main site, still get the 500 error

HammenWS commented 4 years ago

@JuliaUsanova What happens when you require the composer autoload before requirin wp-settings.php? Like

require_once(ABSPATH . 'vendor/autoload.php');
require_once(ABSPATH . 'wp-settings.php');
elreydetoda commented 3 years ago

@JuliaUsanova What happens when you require the composer autoload before requirin wp-settings.php? Like

require_once(ABSPATH . 'vendor/autoload.php');
require_once(ABSPATH . 'wp-settings.php');

@HammenWS, this fixed it for me! Thank you! I had thought that was a possibility, but am not very acquainted with php stuff so I didn't know if it would make a difference :upside_down_face: