inpsyde / multilingual-press

The multisite-based free open source plugin for your multilingual WordPress websites.
https://multilingualpress.org/
GNU General Public License v3.0
234 stars 38 forks source link

MultilingualPress > Quicklink setting magically reactivates itself #115

Closed lkraav closed 9 years ago

lkraav commented 9 years ago

I have a live site where overnight the Quicklink setting gets automagically reset to ON. I keep unchecking it in the morning when people report it to me, but the next day is back. I have no idea how this is possible but it is real and is happening.

This is on SiteGround.

It feels like some sort of a caching problem. Where would you recommend I look?

lkraav commented 9 years ago

Here's my workaround, if anyone else ever runs into this

mu-plugins/multilingual-press-disable-quicklinks:

<?php
    add_action( "inpsyde_mlp_loaded", function() {
        remove_action( "inpsyde_mlp_loaded", "mlp_feature_quicklink" );
    }, 0 );
tfrommen commented 9 years ago

The Quicklink setting—just like any other site option—is an entry in the WordPress *_sitemeta table.

Is the setting ON in the morning for you as well? Or is it just for other visitors? Do you use a DB cache?

What about other MLP settings? Anything strange here?

lkraav commented 9 years ago

Yes, the setting is displayed ON, checkbox ticked, for me as a superadmin, looking at the MLP panel in Network Admin.

I cannot comment on DB cache certainty, but I guess I should ask from SiteGround. https://www.siteground.com/tutorials/supercacher/supercacher_intro.htm only talks about frontend caching and Memcached, but we have memcached turned OFF for this account.

I see from WP debug.log that the database server goes down for a few minutes every night, probably for some backup job maintenance or similar. I have a strong suspicion this is somehow involved in this issue. But I'm wondering, IF there is a systematic problem, how can the rest of the site stay perfectly stable (7 subsites) and only this particular Quicklink setting gets affected. For example MLP custom post translation settings have always worked correctly on the same screen.

tfrommen commented 9 years ago

Well, this is strange.

After having unchecked the Quicklink checkbox, and after having saved the settings, please have a look at the according DB entry. In your *_sitemeta table, does the entry with meta_key being state_modules have s:19:"class-Mlp_Quicklink";s:2:"off";, and not on?!

Would it be possible to (temporary) remove your MU plugin, save your desired settings, wait until tomorrow, and then check your DB values? I know this is not an instant solution. :|

lkraav commented 9 years ago

The main problem is that the quicklinks actually show up in the subsite content, so I'm quite certain the setting is somehow reverted or perhaps it becomes an invalid value that makes the plugin revert to default. I will see what I can do debugging the exact option value. It's a live site, so I have to be careful.

If you've exhausted your ideas, you're welcome to temporarily close this issue while I do some debugging on my end, and I'll reopen when I have information.

tfrommen commented 9 years ago

@lkraav do you have any news on this?

lkraav commented 9 years ago

I don't. Ever since I made the mu-plugin that deactivates the whole feature, the problem hasn't returned.

tfrommen commented 9 years ago

Okay. I will (temporarily) close this issue then. We will definitely (try to) look into this (and other plugin setting issues), though.