API Key Status Not Saving

I see that this problem has been addressed before, but not in the past month or so I think. I have the issue where I login and go to the Updates->WPMU DEV area and my API key is all angsty and red. I click on the 'Update Now' link or the 'Check Key' button and it changes to a nice, calm green. However, if I straight away (or any time later for that matter) click on the Updates->WPMU DEV menu it immediately goes red again.

So, it seems that the key is fine but something in there has a serious short term memory problem. I've attached 3 screenshots.

1. Logged in and went to the Updates->WPMU DEV area. No updates listed and a red API key.
2. Clicked on the 'Check Key' button.
3. Repeated step 1.

The numbered screenshot files correspond to the steps.

I also noticed this time (having not logged in for 5 or 6 days) that the key had been removed from the Anti-Splog settings and there was a message when I logged in telling me that I didn't have an API Key set for Anti-Splog.

The domain is correct and the key works - but only immediately after I update or 'Check Key'. I have Anti-Splog v1.1 and Update Notifications v2.1.


  • teckyhead
    • Design Lord, Child of Thor

    I went through all the logical steps of debugging this problem and found some answers, none of which worked. I did manage to (possibly) fix the problem (I'll wait for Aaron's verdict on that) and here's what I did:

    1. Turned all errors on. This revealed that when the page was loaded without clicking the Update Now link or the Check Key button there was an error in functions.php in the maybe_unserialize function. That error didn't appear when I clicked the link or the button.

    2. Found that the array at line 844 of update-notifications.php is empty when the page gets loaded without clicking the link or the button. That line is:

    $data = get_site_option('wdp_un_last_response');

    That's important for a check that is done a little further down the script. So I echo'd all sorts of fun stuff, pulled some hair out, cursed and stamped my feet. It seemed that no matter what I did that pesky $data wouldn't fill! Mind you, I've never managed to change the contents of an array in the past by pulling hair or stamping my feet, so I can't say I was surprised.

    Anyway, I downgraded my over-thinking, over-complicating neck-top computer into common sense mode and asked myself what the link and the button had that the code around line 844 didn't. The only difference I could see was a call to $this->process() inside both sets of curly braces.

    So, I held my breath and copied and pasted that same function call to the line just above the mis-behaving $data array and voila! My API key field is now a very cool green when I load the Updates->WPMUDev page and all the information on plugin updates etc is there.

    So, Aaron, have I defiled your otherwise pristine code or did I find a genuine solution? :slight_smile:


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.