• Resolved NomadCF

    (@nomadcf)


    So I think this might be a wordpress options saving bug. But I’ve only encountered it with twitget. So here’s what happened, during a “save” of my twitget settings. I saw that the data entry (option_value) that was saved to the database only had value (option_value) of “1”. Nothing more and nothing less just simply the value of 1. And once this happened nothing would have save/update, regardless of that option(s) you changed. Now once I did a DELETE (DELETE FROM wp_options WHERE option_name=”twitget_settings”;). Everything started to work again. Now so far I’ve have this happen on 2x of my 8 wordpress sites. And it’s easy enough to fix. But I can’t seem to track down what is causes it in the first place. I’ve even tried adding in a delete_option before the update. But that has also failed. Once that value is “1”, WordPress seems incapable of dealing with that eatery (option and value) ever again.

    http://wordpress.org/extend/plugins/twitget/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Anonymous User 9905372

    (@anonymized-9905372)

    Thank you for reporting it. However I myself have also been tracking this bug, it happens to some people (rare occasions) but not all of them. Currently I have no idea where this happens. If you have more data what you were doing at the time, I’d be very happy.

    Cheers.

    Thread Starter NomadCF

    (@nomadcf)

    Found a fix, while I still haven’t found the true root of the issue heres what I have. And a fix.

    At some point

    $twitget_settings

    is getting set to

    1

    . And once this is done you can not then make

    $twitget_settings

    an array with out either unsetting it or redeclaring it.

    In other words by the time you start trying to set your vars like
    $twitget_settings['twitter_username'] = stripslashes($_POST['twitget_username']);

    You can’t because it’s already declared as an int (1), So the fallowing code adjusts for this.

    Change

    function twitget_settings() {
    
                    $twitget_settings = get_option('twitget_settings');
                    $message = '';

    to

    function twitget_settings() {
    
                    $twitget_settings = get_option('twitget_settings');
                    $message = '';
                    if ( is_array($twitget_settings) === false ) {
                     unset($twitget_settings);
                    }

    Anonymous User 9905372

    (@anonymized-9905372)

    Thank you! I’ve added the solution in the new plugin version as well.

    Cheers!

    Thread Starter NomadCF

    (@nomadcf)

    Glad I could help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Options not saving.’ is closed to new replies.