Errors when updating plugin through the WordPress plugin repository
I'm working on a plugin that's in the WordPress plugin repository. I've made some changes to the plugin's code. The changes I made were to move code from a large admin.php
file into an /admin
directory. The code has no errors that I can see in the logs. It passes the php codesniffer using the WordPress standard. I have no other plugins installed on my testing site.
With the old version of the plugin active, when updating the plugin through the plugin repository, it seems that the new version of the plugin is not being activated, but initially it's menu item is showing up on the dashboard. If I click on the dashboard menu item I get the error 'Sorry, you are not allowed to access this page.'
When I navigate back to admin/plugins.php
the plugin is deactivated. After reactivating the plugin it works as it's supposed to.
If I update to the new version, and instead of clicking on the menu item, navigate to another admin page, when I return to admin/plugins.php
I get the error notice The plugin my-plugin-1.2.3/my-plugin.php has been deactivated due to an error: Plugin file does not exist.
The new version of the plugin is deactivated and listed in the plugin list. If I then activate it, it works as expected, without errors.
If I deactivate the old version of the plugin, update to the new version, and then activate the new version, everything works as expected.
Does anyone have an idea what could be going on with this?
Topic plugin-repository updates Wordpress
Category Web