• Hi,
    I’m going to update the plugin from 0.4.0 to 1.0.7 on a Multisite installation, where each site has its own custom robots.txt. How can I preserve current plugin configurations of each site?

    The button “upgrade and purge Network” in Network configuration page deletes all options (ms_robotstxt and all the other) of each site and the values are not preserved.

    Is there a way to avoid this, switching to the new option names but preserving the values?
    Thanks in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Carlo

    (@dodo67)

    Any solution?

    Plugin Author tribalNerd

    (@tribalnerd)

    Sorry for the delay, WordPress does not notify me if new topics posted to the support forum, I have no idea why.

    Version 0.4.0 is 10 versions old; the newer versions use different option names, so upgrading that far back wouldn’t preserve the settings, nor would they be compatible with the newer versions.

    Chris

    • This reply was modified 7 years, 6 months ago by tribalNerd.
    Thread Starter Carlo

    (@dodo67)

    Thank you for the reply.

    I know option names has chenged in your plugin, my need is just to preserve values setted for each site, first of all the content of each robots.txt
    It’s not important wich option saves that value, the need is to copy the value from the old option to the new one.

    If this not possible by upgradeing directly form 0.4.0 to 1.0.7 (or 1.0.11), what about uprading step-by-step one version at a time?

    Thanks

    Plugin Author tribalNerd

    (@tribalnerd)

    Hello Carlo,
    Have you by chance tested a step-by-step upgrade?

    I’m not sure if your version preserves or not, or even which version made the changes and if all carry though to the end.

    The newest version is a major change, so it’s possible even if it does preserve, that it will not function as intended as the append rule feature has changed.

    Chris

    Thread Starter Carlo

    (@dodo67)

    Hi Chris,
    I think there is no hope to have values for each blog preserved during step-by-step upgrade.
    After ver.0.4.0 you jumped to 1.0.0 (where there is a bit of mess with files on Subversion). You reordered&cleaned everything with ver.1.0.1
    So, comparing code between ver.0.4.0 and ver.1.0.1, as far as I can see, you never copied the old ‘ms_robotstxt’ option value to the new ‘ms_robotstxt_manager_robotstxt’. The only two lines in 1.0.1 where you use ‘ms_robotstxt’ are line 166 and line 187 in “includes\class_core.php”
    In both lines there is a delete_option( 'ms_robotstxt' );
    I don’t know your code in deep, and I didn’t try a step-by step upgrade, but I think this is the proof that old values get lost.

    Probably in uninstallPreviousVersion function you would had have to create the new set of options for each blog, copying values form the old options before deleting them.

    Carlo

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Preserve options during update’ is closed to new replies.