Blog Post

Please open this page in the Admin panel only

,

I am taking a slight deviation from the usual type of posts that I share.  This time, I just want to share a quick and easy fix that I ran across due to a broken blog site that lasted for about a day starting on July 28th.

I didn’t even know there was a problem for a majority of the outage (ouch!).  And that just reinforced an age old requirement in IT.  If deploying a change – make sure to validate and test after the deployment.  Yes that was a bit embarrassing.  Despite that, there is something else to learn from the outage.

The issue started when updating a plugin called Google Analytics Dashboard.  The update was to go to version 2.1.  Upon completion of the update, all pages on my blog started posting a message that said the following.

Please open this page in the Admin panel only

That said, the root of the problem was related to the gad-admin-options.php file.  The file contained the following code.

function __construct() {
    if( !is_admin() ){
        die( "Please open this page in the Admin panel only." );
    }
}

There are several different means to fixing the problem.

  1. Disable/Delete the plugin.
  2. Comment out the code
  3. Update to 2.1.1 which was released on 7/30.

Options 1 and 3 are very easy.  Option 2 can be done via several methods.  If you have access to your admin page in wordpress, then you can edit the plugin file from the plugins page.  All you need to do is add a comment like in the following code snip.

function __construct() {
    if( !is_admin() ){
        //die( "Please open this page in the Admin panel only." );
    }
}

If you don’t have access to your admin page, that’s ok.  You can still get to the file by connecting to your ftp and performing the same routine.  The file should be located in the following path.

wp-content/plugins/google-analytics-dashboard/gad-admin-options.php

See, real easy.  A little bit of a nuisance but it can be fixed quickly and easily.  Just keep in mind, when deploying a change, take the time to test and verify.  If something is not quite right, be prepared to rollback or find a fix.

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating