[Beehive Pro] Update to Beehive broke all authentications

Hi there,

Since the WPMUDEV Google Analytics plugin became “Beehive,” every single one of our sites has lost its Google authentication and is showing a re-authentication message, along with a very broken/unfinished looking admin page with instructions on re-authenticating.

Currently, we have 83 sites, and it’s unrealistic for us to manually log in and do the authentication token process — what happened here? Is there a way we can re-engage analytics? We have a lot of clients who have lost statistics, and are quite angry. How could this have happened at this scale? I will post a screenshot of the broken-looking admin screen ASAP.

  • Kris Tomczyk
    • Ex Staff

    Hi roundhouseguys

    We apologize for the inconvenience.

    As for first screenshot I was able to log in to your site (this one which have support access open) and I could not replicate this issue. Could you refresh you browser cache and also clear site cache and see if that help?

    I have checked with the developers and re-authenticate can happen if Beehive is unable to log in using an existing token. Please note that no data are lost, as they are stored in GA. Re-authentication should help in this case. Of course at this scale this is many work. I ping developers about the status of version which is in our Q&A, as this should fix this issue. We will post an update here as soon as more information is available.

    Kind Regards,
    Kris

  • IMAGINATE
    • Design Lord, Child of Thor

    Just wanted to post what it was that broke my clients Beehive Pro page. I had this code in my child theme:

    // admin
    add_filter( 'admin_body_class', 'admin_user_id' );
    function admin_user_id( $classes ) {
        global $current_user;
        $user_ID = $current_user->ID;
        $classes = 'user-id-' . $user_ID;
        return $classes;
    }
    add_action('admin_head', 'admin_styles');
    
    // frontend
    add_filter( 'body_class', 'frontend_user_id' );
    function frontend_user_id( $classes ) {
        global $current_user;
        $user_ID = $current_user->ID;
        $classes[] = 'user-id-' . $user_ID;
        return $classes;
    }

    It’s adds the USER ID as a body class. For some reason this code is incompatible with Beehive Pro. I’ve disabled this and it works now. Hope this helps someone who has the same issue.

    • Joel James
      • Ex Staff

      Hey iJason ,

      This code from your child theme is not related to Beehive. But as I can see, you are overwriting the existing admin body classes there, which is wrong. If you need to keep that custom code, can you please correct the function like this.

      function admin_user_id( $classes ) {
          global $current_user;
          $user_ID = $current_user->ID;
          $classes = $classes . ' user-id-' . $user_ID;
          return $classes;
      }

      This will make sure the admin body classes added by Beehive is not removed.

      Regards,
      Joel