Closed marcustallberg closed 3 years ago
Apologies, I'll dig into this, it is likely something to do with the github action used to deploy as all I changed was the supported version header.
Can you give more specific examples? I just set this up by downloading the zip and installing on a 5.7.2 site.
What wp-cli command are you running? Can you work with me to see this through to resolution?
I don't think wp-cli is related to error, it was only a way to get a more detailed error message when /wp-admin was unreachable. The command however was wp plugin list
.
This manifested itself by the plugin being set to self-update automatically.
Do you think if I prepare an asset for you to test you would be able to confirm if it breaks your setup before I release to wp-dot-org? (I already know it doesn't break mine, and I don't know, but can guess why it might be breaking yours)
Here's the asset, it's a modified index.php with changed version check (not related to this issue) and re-ordering of require.
I am sorry this broke your site, and will try to do better in-future. This is uploaded to a host and manually tested through to uploading an SVG, so I don't quite know how I missed this.
All this and it was a missing \
I found if I clear the caching layer my site captures the error too.
2.1.4 coming at you with the fix :+1:
The zip package you provided earlier still raises an error:
Can you check the version from wordpress.org?
If it's broken, I'll dig into it more, but I've just installed it across three sites and uploaded SVG's. One of the sites has never used this plugin before.
Wordpress version: 5.7.2
And now I can confirm the following when testing the different versions: 2.1.4 works 2.1.3 breaks the site 2.1.2 works
I added a note to the plugin directory page apologizing for 2.1.3, and providing 2.1.4. I'll close this now as 2.1.4 can now receive auto-updates and is protected against this issue. It is strange the 2.1.3 didn't work, but perhaps the manual editing of the zip file didn't fix.
Thanks for your patience and understanding.
Describe the bug
Bump from version 2.1.2 -> 2.1.3 causes PHP Fatal Error. Same behaviour on three different sites.
The Context
PHP Fatal error: Uncaught Error: Class 'lewiscowles\Plugins\EnableSVG\lewiscowles\WordPress\Compat\FileTypes\SVGSupport' not found in /var/www/html/wp-content/plugins/enable-svg-uploads/index.php:42
Stack trace:
0 /var/www/html/wp-settings.php(391): include_once()
1 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1237): require('/var/www/html/w...')
2 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1158): WP_CLI\Runner->load_wordpress()
3 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\Runner->start()
4 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(74): WP_CLI\Bootstrap\LaunchRunner->process(Object(WP_CLI\Bootstrap\BootstrapState))
5 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
6 phar:///usr/local/bin/wp/php/boot-phar.php(11): include('phar:///usr/loc...')
7 /usr/local/bin/wp(4): include('phar:///usr/loc...')
8 {main}
thrown in /var/www/html/wp-content/plugins/enable-svg-uploads/index.php on line 42
To Reproduce
Steps to reproduce the behaviour: Install latest version of plugin
Expected behaviour
Expectation is that plugin would work. Rolling back to version 2.1.2. eliminates problem.