• Resolved gelatomyway

    (@gelatomyway)


    [ Moderator note: don’t use block quote for that, use the code button or backtick instead. ]

    Hello,

    I’m running a WordPress multisite ver 3.5.0 .
    I created 2 sites; in one I installed subscribe2 ver 8.7 with an italian language localization and activated it.

    Everythig looks fine but the options keep resetting themselves to the english defaults.

    I tried the reset (repair) function in the options page and it actually resets everything to defaults BUT actually (correctly in my opinion) translating the Templates settings to italian language.

    If i leave these settings, after a while, I find the settings reverted back to the english defaults.
    There is no way to keep the defaults from changing.

    I then looked out in my sql database for Subscribe2 options records.

    Mine are inside WP_2_options . The serialized record , before reset/restore is the following:

    a:40:{s:7:"autosub";s:2:"no";s:15:"newreg_override";s:2:"no";s:8:"wpregdef";s:2:"no";s:10:"autoformat";s:7:"excerpt";s:12:"show_autosub";s:3:"yes";s:11:"autosub_def";s:3:"yes";s:12:"comment_subs";s:2:"no";s:11:"comment_def";s:2:"no";s:17:"one_click_profile";s:2:"no";s:8:"bcclimit";i:1;s:11:"admin_email";s:4:"subs";s:8:"tracking";s:0:"";s:6:"s2page";i:0;s:10:"stylesheet";s:3:"yes";s:5:"pages";s:2:"no";s:8:"password";s:2:"no";s:8:"stickies";s:2:"no";s:7:"private";s:2:"no";s:10:"email_freq";s:5:"never";s:10:"cron_order";s:4:"desc";s:10:"compulsory";s:0:"";s:7:"exclude";s:0:"";s:6:"sender";s:1:"1";s:12:"reg_override";s:1:"1";s:9:"show_meta";s:1:"0";s:11:"show_button";s:1:"1";s:4:"ajax";s:1:"0";s:6:"widget";s:1:"0";s:13:"counterwidget";s:1:"0";s:14:"s2meta_default";s:1:"0";s:7:"entries";i:25;s:6:"barred";s:0:"";s:15:"exclude_formats";s:0:"";s:8:"mailtext";s:215:"{BLOGNAME} has posted a new item, '{TITLE}'
    
    {POST}
    
    You may view the latest post at
    {PERMALINK}
    
    You received this e-mail because you asked to be notified when new updates are posted.
    Best regards,
    {MYNAME}
    {EMAIL}";s:20:"notification_subject";s:20:"[{BLOGNAME}] {TITLE}";s:13:"confirm_email";s:229:"{BLOGNAME} has received a request to {ACTION} for this email address. To complete your request please click on the link below:
    
    {LINK}
    
    If you did not request this, please feel free to disregard this notice!
    
    Thank you,
    {MYNAME}.";s:15:"confirm_subject";s:40:"[{BLOGNAME}] Please confirm your request";s:12:"remind_email";s:348:"This email address was subscribed for notifications at {BLOGNAME} ({BLOGLINK}) but the subscription remains incomplete.
    
    If you wish to complete your subscription please click on the link below:
    
    {LINK}
    
    If you do not wish to complete your subscription please ignore this email and your address will be removed from our database.
    
    Regards,
    {MYNAME}";s:14:"remind_subject";s:34:"[{BLOGNAME}] Subscription Reminder";s:7:"version";s:3:"8.7";}

    The serialized record after reset/restore is:

    :40:{s:7:"autosub";s:2:"no";s:15:"newreg_override";s:2:"no";s:8:"wpregdef";s:2:"no";s:10:"autoformat";s:7:"excerpt";s:12:"show_autosub";s:3:"yes";s:11:"autosub_def";s:3:"yes";s:12:"comment_subs";s:2:"no";s:11:"comment_def";s:2:"no";s:17:"one_click_profile";s:2:"no";s:8:"bcclimit";i:1;s:11:"admin_email";s:4:"subs";s:8:"tracking";s:0:"";s:6:"s2page";i:0;s:10:"stylesheet";s:3:"yes";s:5:"pages";s:2:"no";s:8:"password";s:2:"no";s:8:"stickies";s:2:"no";s:7:"private";s:2:"no";s:10:"email_freq";s:5:"never";s:10:"cron_order";s:4:"desc";s:10:"compulsory";s:0:"";s:7:"exclude";s:0:"";s:6:"sender";s:8:"blogname";s:12:"reg_override";s:1:"1";s:9:"show_meta";s:1:"0";s:11:"show_button";s:1:"1";s:4:"ajax";s:1:"0";s:6:"widget";s:1:"0";s:13:"counterwidget";s:1:"0";s:14:"s2meta_default";s:1:"0";s:7:"entries";i:25;s:6:"barred";s:0:"";s:15:"exclude_formats";s:0:"";s:8:"mailtext";s:241:"{BLOGNAME} presenta un nuovo intervento, '{TITLE}'
    
    {POST}
    
    Puoi leggere l'ultimo articolo su
    {PERMALINK}
    
    Hai ricevuto questa e-mail perché hai chiesto di essere notificato quando vengono fatti degli aggiornamenti.
    Grazie,
    {MYNAME}
    {EMAIL}";s:20:"notification_subject";s:20:"[{BLOGNAME}] {TITLE}";s:13:"confirm_email";s:224:"{BLOGNAME} ha ricevuto una richiesta di {ACTION} per questo indirizzo e-mail. Per completare la procedura clicca sul link sottostante:
    
    {LINK}
    
    Se non hai effettuato alcuna richiesta, ignora questa e-mail.
    
    Grazie,
    {MYNAME}.";s:15:"confirm_subject";s:38:"[{BLOGNAME}] Conferma la tua richiesta";s:12:"remind_email";s:324:"Questo indirizzo e-mail è stato iscritto per ricevere notifiche via e-mail da {BLOGNAME} ({BLOGLINK}) ma la procedura non è stata completata.
    
    Se vuoi confermare la tua iscrizione clicca sul link sottostante:
    
    {LINK}
    
    Altrimenti, ignora questa e-mail e il tuo indirizzo sarà rimosso dal nostro database.
    
    Saluti,
    {MYNAME}";s:14:"remind_subject";s:34:"[{BLOGNAME}] Promemoria iscrizione";s:7:"version";s:3:"8.7";}

    Where is the problem??

    Thanks
    Best Regards
    Luca R.

    http://wordpress.org/extend/plugins/subscribe2/

Viewing 15 replies - 1 through 15 (of 31 total)
  • @luca,

    I don’t use Multisite myself but even so I’m not sure why this would happen. The settings are created when the code detects that it isn’t installed. This may happen if there is a failure in the connection to the database but if that were the case the creation of new settings should fail also.

    Without a much greater understanding of why this is happening on your site I cannot offer an explanation or a fix.

    Thread Starter gelatomyway

    (@gelatomyway)

    @mattyrob

    I’m sorry I used “b-quote” instead of “code” buttons above.

    I’m trying to narrow the problem down.

    I have a multisite installation that has one “root” site and two “child” sites, one for italian and one for english languages.

    The “root” site contains a one line of code theme that detects user language and redirects to either of the two “child” sites.

    I installed and activated Subscribe2 in the “root” site as required by wordpress multisite.
    I then installed Subscribe2 in the italian language site and immediately experienced the problem.

    After Your answer, I activated Subscribe2 also in the english site.

    I then first cheched that the Subscribe2_option records are in the right places. I’m not a wordpress programmer nor a php programmer but I understood that each “site” has a specific site database option name, so I have:

    wp_options -> “root” site options database
    wp_2_options-> “italian” site options database
    wp_3_options->”english” site options database

    all 3 carry a subscribe2_options record.

    By manually updating the subscribe2_options sql records I see that each site loads and shows the correct options in the settings pages.

    Now the following is happening:

    “root” site options never change
    “english” and “italian” site options change automatically after a while and they get the same “root” values.

    Here is my guess:
    some code in the cron queue is updating options in the 3 sites at every execution of cron. While the options are saved in the correct tables (I have all 3 updated), it’s the LOAD of the actual options at the start of every “site” execution of cron code that is always getting values from “root” and not from each “site”.

    If we don’t find a solution, I’ll have to quit using this nice plugin.

    Thanks
    Best Regards
    Luca R.

    Thread Starter gelatomyway

    (@gelatomyway)

    Hello,

    I see the following code in class-s2-core.php

    /**
    	Send a daily digest of today's new posts
    	*/
    	function subscribe2_cron($preview = '', $resend = '') {
    		if ( defined('DOING_S2_CRON') && DOING_S2_CRON ) { return; }
    		define( 'DOING_S2_CRON', true );
    		global $wpdb, $post;
    
    		if ( '' == $preview ) {
    			// update last_s2cron execution time before completing or bailing
    			$now = current_time('mysql');
    			$prev = $this->subscribe2_options['last_s2cron'];
    			$last = $this->subscribe2_options['previous_s2cron'];
    			$this->subscribe2_options['last_s2cron'] = $now;
    			$this->subscribe2_options['previous_s2cron'] = $prev;
    			if ( '' == $resend ) {
    				// update sending times provided this is not a resend
    				update_option('subscribe2_options', $this->subscribe2_options);
    			}

    is this last line update_option function updating all the options record at once at every cron call?

    Thank Yo
    Luca R.

    @luca,

    I’m not 100% sure about this, as I said before I don’t use multisite, but disable the ‘root’ instance of Subscribe2 and just leave it active on the “Italian” and “English” sub sites and see if that helps. I’ll have a look through the multisite code and see if I can think of a way this may be happening.

    That code you’ve found only updates 2 parts of the overall serialized settings array if you are also using the code in digest mode. It doesn’t reset or update the entire settings value again.

    Thread Starter gelatomyway

    (@gelatomyway)

    Hello,

    I tried to disable Subscribe2 on “root” but it does’nt work.

    There’s no way I can keep the options at their place.

    I’m sorry but I deleted Subscribe2 form my install.

    Thank You
    Best regards
    Luca R.

    @luca,

    I have not had any other reports of this on Multisite installs. If you’ve deleted, I guess we’ll never know why this happened.

    Thread Starter gelatomyway

    (@gelatomyway)

    Hello,

    I understood You have no way to help me.

    I can always reinstall if You give me intructions about what should I check…

    Best regards
    Luca R.

    @luca,

    Try starting with this if you have the time to bug hunt. Upload the Subscribe2 code and activate it on just the “Italian” blog. Does it reset to English on there?

    Also, are you using a gettext translation into Italian for the entire plugin on this sub-blog?

    Thread Starter gelatomyway

    (@gelatomyway)

    Hello,

    I reinstalled Subscribe2 strictly following the Subscribe2 instrucions page, downloading and applying the plugin from the “network administrator” panel in wordpress.
    I have now Subscribe2 V8.8 installed.

    I then activated Subscribe2 plugin only in the “italian” site.
    I did not ftp-upload any language file as I did with V8.7 (subscribe2-it_IT.mo file I fond somwhere on the web).

    The following happened:

    1) In the “italian” site the settings page was already populated with the last settings of V8.7 . This means only that the Subscribe2 option records were not automatically deleted at the previous uninstall of V8.7.

    2) I then changed some settings around with fresh values and they (in the last hour) apparently held. Previously , it did not hold values more than 5 min.

    These components are installed:
    Theme ElegantThemes Aggregate 2.9
    Plugins Social Media Widget 3.2 , JetPack 2.1.2

    Tell me the next step; I suggest to activate Subscribe2 on the english site and see if it holds settings and then, only afterwards, add the italian translation.

    Is there a suggested source for the correct italian translation files?
    I can also Poedit it if required.

    Thank You
    Best Regards
    Luca R.

    @luca,

    Okay, so far so good. If the settings are remaining the same if the code is enabled only on the Italian site then I think it is time to take the next step.

    You can either enable on the English site OR apply the Italian language changes. Luckily enough another plugin user has made their translation efforts available within the last few hours.

    http://plugins.trac.wordpress.org/browser/subscribe2/i18n/it_IT/8.8

    I would suggest trying the translation first and if everything remains okay with that, then enable on the English site.

    Thread Starter gelatomyway

    (@gelatomyway)

    @mattyrob

    I did the following:

    1) dropped the italian translation in the plugin/subscribe2/ directory.

    2) Checked that the italian translation was active in the dasboard.

    3) Reset of subscribe2 to default settings by pressing the reset button

    4) verified that settings held ok.

    5) activated subscribe2 plugin in “english” site.

    At this point the problem occurred again.

    I observe this:
    a) in the “english” site everything is reset to english language.
    b) in the “english” site , under “appearance” tab, the “set default subscribe2 page at” option lists only a “sample page” item. I have no pages named “sample page” and the dropdop list lacks all the pages I have in the site.
    c) in the “italian” site all the themplates in the themplates tab reverted to english language.
    d) in the “italian” site , under “appearance” tab, the “set default subscribe2 pag at” option is set to the first page of the site pages and no more to the one I choose.
    e) in the “italian” site the dashboard text regarding subscribe2 is still in italian.

    @luca,

    I wonder if this is something to do with the language file? Can you try again but miss the language file out this time?

    Thread Starter gelatomyway

    (@gelatomyway)

    @mattyrob,

    I just deleted the subscribe2-it_IT.mo file and changed some settings in subscribe2.
    No improvements.
    Same beaviour, settings are automatically cloned from “english” site to “italian” site in a matter of a few minutes.

    Note the following:

    1) Subscribe2 plugin is disabled in “root” site, so now apparently options are cloned from “english” site instead of “root”.

    2) Under “email settings” tab, the option “send email from.” is correctly kept to the right value in both sites, “italian” and “english”. Previously, it was messed up like the other settings.

    3) Creation order of the 3 sites is “root”,”italian”, “english”

    Do You want me to uninstall and reinstall Subscribe2 but miss the italian file?

    @luca,

    Yes, give that a try, you may need to access the updated uninstaller here:

    http://plugins.svn.wordpress.org/subscribe2/trunk/uninstall.php

    Thread Starter gelatomyway

    (@gelatomyway)

    @mattyrob

    I FTP udated uninstall.php, even if appeared to be exactly the same as the one You suggested.

    I then “deactivate”d subscribe2 from every site and finally “delete”d it from the dashboard.

    I installed again Subscribe2 (v8.8) from the dashboard (automatic download and install).

    I activated Subscribe2 in both sites, “italian” and “english”

    I made a reset of both.

    It DOES’NT work, it keeps resetting itself messing up the settings.

    I confirm that it’s still missing to enumerate the pages in the “english” site in the “Set default Subscribe2 page to:” setting. I have some pages but none of them is listed, just a “sample page” setting is there but I have no pages with such a name.

    While the “send email from” setting is correctly set to both sites. I did not have to change it, this makes me suspect that none of the previous options was deleted from the sql database during uninstall.

Viewing 15 replies - 1 through 15 (of 31 total)
  • The topic ‘Options keep resetting with no reason’ is closed to new replies.