WordPress.com Stats
Keeps asking for API key even though I have entered it (2 posts)

  1. huyz
    Posted 5 years ago #

    After entering my API key, the plugins page keeps saying:

    WordPress.com Stats needs attention: please enter an API key or disable the plugin.

    When I go to the stats setting page, there is no way to re-enter the key

  2. huyz
    Posted 5 years ago #

    I hacked my way out of this damn thing.

    Here's what my 'stats_options' field had in mysql:

    Note that the 'api_key' is null.

    I had to manually hack the plugin to reallow me to enter the API key:

    I temporarily changed:
    <?php if ( empty($options['blog_id']) && !empty($options['key_check']) ) : ?>
    <?php if ( true || empty($options['blog_id']) && !empty($options['key_check']) ) : ?>

    After re-entering my key, I now have this in mysql:
    Note how the api_key now has a value.

    Looks like the wordpress.com server had given back some sort of error when it did the API check the first time, and this plugin didn't handle it properly and was stuck in an undefined state.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic