ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

EE Connection Error causing my plug-ins to break?

July 13, 2012 1:01am

Subscribe [2]
  • #1 / Jul 13, 2012 1:01am

    susansan

    75 posts

    Hi, I noticed tonight around 6:45pm (Pacific) that two of my plug-ins (custom) that work with 3rd party API’s were piling on the error messages in my Developer Log.  That seemed strange, then I noticed something else…On my CP homepage I’m getting this message:

    “An unexpected error occurred attempting to download the current ExpressionEngine version number. Please visit your Download Account to verify you are on the current version. If this error persists, please contact your system administrator”

    I’m 100% sure this message wasn’t there this morning (and my error log was empty too).  I’ve actually never seen this message, and I login almost every day.  Then, I logged in to our staging server CP, which we have set to display PHP errors and there are tons of errors.  The first one is:

    A PHP Error was encountered
    Severity: Notice
    Message: Undefined offset: 1
    Filename: accessories/acc.expressionengine_info.php
    Line Number: 111

    Then, this error is repeated over a dozen times:

    A PHP Error was encountered
    Severity: Notice
    Message: Undefined offset: 2
    Filename: cp/homepage.php
    Line Number: 307

    I’m usually logged into our staging server every day as well, and this is the first I’ve ever seen this.  I have a feeling that whatever is wrong is might be causing our two plug-ins to break.  Any ideas?  I haven’t touched our production server in months and I haven’t had any issues with the staging server until tonight when I logged in and saw all the errors.

    We’re on EE v 2.4.0

    [EDIT]  The plug-ins that are affected are only those being called by another plug-in. In other words, they’re not being called from a template using an exp: tag. For example, Plug-in A calls Plugin-B and Plug-in C like this:

    $plugin_b = new Plugin_b;
    $plugin_b->some_function();
    
    $plugin_c = new Plugin_c;
    $plugin_c->some_function();

    Thanks,
    Susan

  • #2 / Jul 13, 2012 1:05am

    The error you’re seeing is to do with your installation unable to check for the version number at expressionengine.com. If you’re hosted on EngineHosting it may have something to do with your provider as they are having loads of problems at the moment, thus, your site will have difficulties checking the version number.

    You can also complete disable the check at Admin -> General Configuration -> change “New Version Auto Check” to No.

  • #3 / Jul 13, 2012 1:25am

    susansan

    75 posts

    Thanks Michael, I tried disabling that setting, but the PHP errors don’t go away and the errors being generated from the plug-ins are still filling up the developer log :(  The only difference seems to be that the “An unexpected error occurred attempting to download…” message doesn’t display on the homepage.

    Also, I’m stumped as to why it’s only these plug-ins that this problem is breaking.  All of our other plug-ins are fine.  It’s really bad though - this affects our entire order process (it stops it, actually).  I have to manually update our customer’s accounts in those 3rd party systems for every single error that shows up in the log.  As far as I know, it’s okay to call a plug-in from within another plug-in, but in this case, apparently not?!

  • #4 / Jul 13, 2012 1:31am

    Can you verify connectivity between your production server and this third party provider? As this third party made any API modifications that you’re unaware off?

    The fact you’re seeing issues checking the version number from another site, leads me to think you’re problems are server/connectivity related and your plugins weren’t designed to handle these type of connectivity issues.

    I would be checking into connectivity issues and resolving that, then worry about how you can improve the plugins to be more robust.

  • #5 / Jul 13, 2012 4:07pm

    susansan

    75 posts

    I emailed EngineHosting last night and was told that there were several internet routing issues that happened yesterday, so that may explain why the two plug-ins I have that connect to 3rd party API’s stopped working for a while (and you’re right, I should do better checking in those cases).  Both of the plug-ins began working again a couple of hours after I started this thread.

    However, the EE connectivity issue remains and on our staging site (which is on the same server as production) I’m still seeing those PHP errors all over the Admin CP.  In production, however, I’m not seeing the PHP errors, but the CP homepage still has the “An unexpected error occurred attempting to download…”.  The weird thing is that the staging CP homepage no longer shows that notice (just the PHP errors) even though “New Version Auto-Check” is set to “on”.

    I check some of those lines of code based on the PHP errors:

    this is line 111 in acc.expressionengine_info.php

    $str .= '<li>'.str_replace(array('%v', '%b'), array($latest_version[0], $latest_version[1]), lang('current_version')).'</li>';

    ...and this is line 307 in cp/homepage.php

    if ($app_data[0] > APP_VER && $app_data[2] == 'high')

    ...and line 318

    elseif ($app_data[1] > APP_BUILD && $app_data[2] == 'high')

    After explaining this to Engine Hosting, this is the response I received:

    The problem has to be because the EE update servers are unavailable or at least are not able to be connected to from your account here. When the php code runs that checks the EE update server to see if there is a new version available, it has to store the value returned by the remote server which is then used throughout the page to print out the value. It stores this value in an array, and is accessed through its index (number 2) which doesn’t exist because the check to the EE update server never returned a value. This is why you see the undefined offset notice in the php error_reporting output.

    This problem is with EE’s update servers. You should contact them for more information on when their update server will be available again or disable debug output for now for superadmin EE user accounts logged into the CP.

    So I guess now my question is…Is the connectivity issue with the EE update servers a known issue and if so, is there an ETA for a fix?

  • #6 / Jul 15, 2012 1:19am

    susansan

    75 posts

    I noticed today that everything on our sites are back to normal.  Guess the EE upgrade servers are back 😊

  • #7 / Jul 16, 2012 11:48am

    Shane Eckert

    7174 posts

    Hello susansan,

    It sounds like all is well. Sorry about your trouble there.

    Is there anything else I can help with?

    Cheers,

  • #8 / Jul 16, 2012 4:47pm

    susansan

    75 posts

    Nope, we’re good.  Thanks, Shane 😊

  • #9 / Jul 17, 2012 2:08pm

    Shane Eckert

    7174 posts

    Hey susansan,

    Awesome!

    If you need anything else, please just let me know by opening a new thread.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases