• Resolved jeffro25x

    (@jeffro25x)


    Hey all, my widgets keep disappearing from my site when i edit them. I have come to realize that if I go into the database, copy and delete the widget text and update it, then paste in the exact same code and save it again, it still never comes back. Am I missing something as to how these things are working? I know they are serialized arrays, but I didn’t change anything to the widget. I just copied the text out of the column and deleted the tex then saved it. I paste it back in and the widget is still gone. Any advice?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The serialized data includes more than a random number…

    Do this – switch to default unedited theme – delete all your widgets – yup delete them all – including any that are inactive. You can keep track on your own of widget’s position and content off-site.

    Test (add widgets)- note: best to do so with all plugins deactivated to ensure it’s not one of them causing the issue.

    Activate your theme. Test (add widgets)- note: best to do so with all plugins deactivated to ensure it’s not one of them causing the issue.

    Thread Starter jeffro25x

    (@jeffro25x)

    Well, I have a back up of the database that I restoring from and when I restore it, it works fine. Which is weird because I didn’t change anything at all and it disappears when saved. Even if I copt and paste it from the backed up database(the one that works), they still do not come back. I literally have to drop the database and import from the sql file.

    It would be best if you used the front end widgets section to manage your widgets.

    Thread Starter jeffro25x

    (@jeffro25x)

    I figured it out. For whatever reason, it doesn’t like it when you update it directly through the database. However, if I write my own code and unserialize the data, add a widget to the array, then serialize it again and update it through a script, it seems to work properly. Now I can do the same thing with the sidebars_widgets to add it to the correct sidebar and viola! Programmatically added widgets. Hopefully someone can find this useful that is having this issue. I have a multiuser site and it is very beneficial to be able to do it this way. Thanks for your help!

    Thread Starter jeffro25x

    (@jeffro25x)

    This is resolved. Marking it as so.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Text Widgets disappearing from site’ is closed to new replies.