u3a-siteworks-development / u3a-importexport

The import/export plugin for u3a data
GNU General Public License v2.0
0 stars 0 forks source link

OP1104 plugin can fail to load and cause fatal error #15

Open nicktrosnant opened 1 week ago

nicktrosnant commented 1 week ago

If WM attempts bulk action to deactivate all plugins the import export plugin can cause a fatal error due to missing dependency.

The problem is that the call to is_plugin_active() to check whether the SiteWorks core plugin is present and active will fail if the WordPress core file where it is defined (in plugin.php) has not been loaded.

A solution is suggested in WordPress StackExchange solution by "scribu". Before calling is_plugin_active() make sure that plugin.php is loaded:

require_once(ABSPATH.'wp-admin/includes/plugin.php');

edwery commented 3 days ago

The fix is now in the main branch, pending release to testing