• Anyone else have trouble with PHP widgets clearing the text when you save changes? If so, any ideas as to the cause and a solution?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Yes – or I drag a new widget into a sidebar and it never shows up, not even after I edit the title and save it. If I exit the widget page and go back in the new widget is no longer in the sidebar. Seems to be a 2.9x thing. I’m befuddled.

    UPDATE: I think I figured it out. If I have a saved version of a widget, for example Search, in the ‘inactive widgests’ section, but I drag over the Search from the active widgets section instead of the saved one it will not show up. I have add the inactive ‘Search” or it doesn’t work. Maybe this is because we can’t save two versions of one widget, kind of like not having two duplicate file names in the same directory?

    OK – it is a little more complicated than I first thought, but I think I finally solved it. I had the problem AGAIN with a new theme and simply reusing saved widgets didn’t fix it. For example, the META widget would work but Pages widget would not. I tried all the fixes I found in the forum… disabling all plugins, clearing all widgets with the Widgets Rest plugin, using the accessibility version (aka JavaScript free version) of the widget page. Some themes, including Hybrid, worked, but my new theme, a copy of Hybirid that I’m customizing, did not work. My theme copy had only a few cosmetic changes made to it so didn’t make sense that a defective theme was at fault.

    In my various attempts to fix, I noticed that different widgets were available or saved depending on which theme I loaded. Finally, I renamed both the theme folder and the theme name in styles.css, switched to a different theme and then switched back to my Hybrid clone, now finally the widgets are working!

    My theory is that widget settings are somehow getting ‘stuck’. I looked into the database using phpMyAdmin and see that some themes save widget settings in the options table under the likes of widget_themname-pages, as well as a generic widget_pages. The Widgets Rest plugin seemed to only be able to reset the generic versions and not the theme-specific version. My next step would have been to clear that widget data manually — since they appear to to be created when a new theme is loaded I guessed that it is safe to clear the data — but I have not fully tested this or how to restore things, so backup your database before you try it at home! A safer bet would be to rename your problematic theme to give it a fresh start.

    Note – the Thematc theme has its own “reset plugin” button – I suspect that this is in response to this same problem.

    Good luck!

    I think I’ve tried all the fixes. but widgets, screen options, Upload/Insert, visual Html, buttons still do nothing when clicked.
    I’ve just given up on ’em.

    I’m just trying to get some widgets into my sidebar(s). Anyone know how to place a code manually for a widget that you’re supposed to be able to drag to you sidebar. I know where to but the code, but how do you find out what the code for the widget is? tnx

    aj3x2 —

    You CAN edit sidebar.php directly, but I strongly advise fixing the problem instead.

    Try this:
    1. temporarily switch to a different theme, any theme.
    2. Rename the folder containing the theme you want to use
    3. Change the theme name specified at the top of style.css
    4. Switch to the theme you just renamed

    When I do this my stubborn widgets start working. I also suspect that nuking the rogue widgets out of the database would also fix the problem, as I described above.

    Here’s how I solved this problem without renaming the theme:

    The Page widget in a variation of the Hybrid theme refused to show up where I put it. I edited themename/library/functions/widgets.php (there is probably a similar section in functions.php for other themes) and changed this:

    register_widget( 'Hybrid_Widget_Pages' );
       to
              register_widget( 'WP_Widget_Pages' );

    that replaced the overkill complicated theme widget with the default WP widget.

    Then I commented out this line:
    /*unregister_widget( 'WP_Widget_Pages' );*/ so it wouldn’t unload after being loaded.

    I’m creating a couple of custom themes and switching between them frequently. Something about this behavior seems to corrupt some of the Hybrid widgets. I don’t have time to figure out why since the default page widget does everything I need.

    Meanwhile I’m goign to try out a different base theme for my next project — still looking for the best replacement for Sandbox

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PHP enabled text widgets not saving content’ is closed to new replies.