WordPress.org

Ready to get started?Download WordPress

Forums

Search and Replace
[resolved] Misses code in text widgets?? (3 posts)

  1. adambundy
    Member
    Posted 2 years ago #

    Awesome plugin- thank you! Why does this miss code in text widgets most of the time??

    Thanks!

    http://wordpress.org/extend/plugins/search-and-replace/

  2. Frank
    Member
    Plugin Author

    Posted 2 years ago #

    text of widgets are in options of this widget; als serialized data; not easy to replace in database; you can test this about the "about all" search, but i think, its not possible and you destroy the option of this widget.

  3. circlecube
    Member
    Posted 1 year ago #

    Meaning that text widgets are stored in the database as a serialized data. Serialized data needs to know how many characters are in the text (or any data), so if you replace a string with a different length string the length of the value in the serilaized data changes and unless you update the length value as well the serialized data becomes corrupt. It'd sure be nice if the plugin supported this, but it'd get pretty complex to read and write serialized data, but I'd hope a workaround would be to have a setting to omit text widgets from the replace Frank?

    Moral of the story, don't use this to replace text in your text widgets because it will break them.

    Frank refers to the "All - only search!" field to test your search first and see if the search is found in your text widget(s). Once you see if it is, then I'd recommend updating the text widgets manually first and then continue with the search and replace.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic