WordPress.org

Ready to get started?Download WordPress

Forums

Scripts n Styles
[resolved] Caution -- Ver. 3 update removes all custom scripts (5 posts)

  1. lheintzman
    Member
    Posted 2 years ago #

    The rationale for deleting scripts on uninstall makes sense. But for the sake of folks who find this plugin useful--as I do--and just want to update without losing all their work--as I did--it would be great if you could figure out a way to implement new versions that doesn't invoke uninstall.php.

    Just a suggestion. Otherwise, this is a great WordPress addition.

    http://wordpress.org/extend/plugins/scripts-n-styles/

  2. WraithKenny
    Member
    Plugin Author

    Posted 2 years ago #

    I'm Really horrified to hear that. That is NOT intended behavior. I've tested upgrading from 2.0.4 on WP 3.3-rc and that didn't happen to me, so perhaps its due to a change in core that I missed.

    Can I get a little more info about what happened? I see you were on WP version 3.2.1. Which version of the plugin were you upgrading from? Are you missing all Scripts? Or is it only per-post or global scripts that are missing? Are Styles still intact? If it's just scripts, is it either the footer scripts, the head scripts, or both? I'm trying to track down what could have happened as fast as possible.

    There is an upgrade script that should run, but not the uninstall.php. That is only supposed to run when the plugin is explicitly run via the admin uninstall routine. You issue may be related to the upgrade script.

  3. WraithKenny
    Member
    Plugin Author

    Posted 2 years ago #

    I've been able to duplicate this once... The good news is (if this is what happened) that the scripts might not be gone for good. Please visit a Scripts n Styles admin page, the usage page would be good. This should kick in the upgrade script and show your posts/pages that have scripts. Check for whether the data is restored.

    (This sounds like my upgrade script being attached to 'activation' isn't fired on upgrades. Alternatively, deactivating and reactivating should fix it by finishing the upgrade process.)

  4. lheintzman
    Member
    Posted 2 years ago #

    Hey WraithKenny, appreciate the quick response.

    Fortunately, this wasn't the disaster it might have been. Only installed v2.04 yesterday a.m. for one specific purpose -- to insert an identical, small piece of javascript in the footer of approx 5% of posts on the site.

    Worked beautifully, so when a v3.0 notice showed up in the Admin panel, I briefly read the changelog and clicked automatic install. Bam, the box containing the script was suddenly blank on every page.

    The script isn't essential. It just makes the pages that include it a whole lot more useful, and its absence is pretty noticeable. Wasn't such a big deal to manually reinsert it. Which I did. The upshot being that I can't say whether the original scripts were gone for good or whether they can be restored.

    Much as I'd like to help sort this out, I'm not a code writer by any stretch. No doubt there are others who might provide more useful input. Just thought it was worth bringing to your attention.

    Otherwise as mentioned, Scripts 'n Styles is a highly useful plugin.

  5. WraithKenny
    Member
    Plugin Author

    Posted 2 years ago #

    I really appreciate feedback (of any sort) :-)

    Just keep in mind, I think whenever you get around to visiting the admin page, the old data will likely get "updgraded" and so replace your new data... You may as well do that sooner rather then later so that it isn't unexpected.

    I intend this to be the only release that deals with upgrading in this manner, so in the future, this won't be a problem at all.

    I'm glad even after that experience you still like the plugin!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic