bueltge / must-use-loader

This small WordPress plugin include all plugins in subdirectories from Must Use plugin folder
MIT License
62 stars 20 forks source link

Only showing 4 plugins, no more #3

Closed amityweb closed 7 years ago

amityweb commented 8 years ago

This works fine for 4 plugins. I add a new plugin and its not showing. I tried another plugin and its not showing. then another! Seems the only 4 plugins I initially added are showing. Is there some sort of caching, or something else I need to do? Thanks

amityweb commented 8 years ago

I removed a plugin already installed from mu-plugins and had a internal server 500. When I enabled debugging to see what the error was, the page then worked, and my new plugins showed.

bueltge commented 8 years ago

Yes, the plugin have caching via transients, a core feature for simple caching inside the database. Do you have a error message, that a I can retrace the problem? Best.

amityweb commented 8 years ago

Sorry for late reply..

If I move a mu-plugin out of the mu-plugins folder I get this if display_errors is 1:

Warning: require_once(/home/mysite/public_html/wp-content/mu-plugins/amity-events/amity-events.php): failed to open stream: No such file or directory in /home/mysite/public_html/wp-content/mu-plugins/mustuse-loader.php on line 198 Fatal error: require_once(): Failed opening required '/home/mysite/public_html/wp-content/mu-plugins/amity-events/amity-events.php' (include_path='.:/usr/share/pear:/usr/share/php') in /home/mysite/public_html/wp-content/mu-plugins/mustuse-loader.php on line 198

If display_errors is 0, then I get no error, just an internal server 500. not even the main errors.log file for apache/php has any errors in it.

If WP_DEBUG_LOG is true, I dont get any errors and it all works OK, new plugins are shown, deleted plugins removed.

bueltge commented 8 years ago

If the const WP_DEBUG is true, then I deactivated the cache. Thats the point, that you not have a error message, if the const ẀP_DBUG_LOGis true. This const set alsoWP_DEBUG`.

I validate the cache with validate_plugins. Maybe here a bug. I check the mu-plugin directory and each plugin, it is readable.

amityweb commented 8 years ago

Maybe we just need some instructions how to clear the cache. What confused me is you call it cache, and refer to "network". BUT I notice that if we delete the row with option_name "_site_transient_subdir_wpmu_plugins" from the wp_options table, then its recreated on refresh, and I think that works.

So when you say cache, do you mean the site transients, in "_site_transient_subdir_wpmu_plugins"?

If so, then maybe some instructions to make it easy to clear this out and be recreated will be OK. Its pain to have to go delete the row in a SQL manager!

Or just check if a new plugin exists or an old one is deleted when the plugins page is loaded in Admin, then clear the cache (only check when the plugins page is loaded, not when loading all admin or front pages!).

Thanks

bueltge commented 8 years ago

The logic of the plugin should refresh the cache. I will debug this in the next view days and write a feedback. The plugin should only run, run, run, no doing on user side.

bueltge commented 8 years ago

@amityweb I have debugged now and I think I have also follow the problem. The validations works right, but I have not checked the feedback of the validation. Please can you also test. Thanks a lot.

amityweb commented 8 years ago

I installed the latest version, and when I moved a plugin out of the mu-plugins folder, it worked! No Internal Server 500 error and the plugin removed.

BUT... :(

When I put that plugin back into mu-plugins it did not reshow it, which is the original issue I raised.

What we do in the meantime is just set debug=true in wp-config.php, reload which then loads the plugin, then disable debug again. So Its straightforward, but it would be good if it would recognise it automatically.

Thanks

bueltge commented 8 years ago

After the point, there you copy back the plugin in the mu-plugins directory, have you viewed the network-plugin page? On view on this page I refresh the cache value.

amityweb commented 8 years ago

Sorry for late reply... I dont know what you mean by "viewed the network-plugin page" - we are not using multisite if you mean the multisite Networks. Just a one Wordpress site. Thanks

bueltge commented 7 years ago

Just a one Wordpress site.

I will test this again. MU-Plugins was currently only in the Multisite Environment a topic for me in this context, of this plugin.

*Sorry for the late reply, to much topics.

bueltge commented 7 years ago

@amityweb Please can you retest again. I have rebuild the set, get of cache and it works fine in my tests. I remove, add plugins in the folder of mu-plugins and always i get the right view in the admin area.