1

Today, on our live website, we encountered an issue around 10:00 AM CDT where our orders where not getting quotes from UPS, and to contact our office. Upon digging into the issue, and turning on logging (System > Configuration > Developer > Logging) we're getting this error being thrown:

ERR (3): Notice: Undefined variable: error in /var/www/html/website.com/app/code/local/SITE/Shipping/Model/Carrier/Ups.php on line 574.

When we start digging into these files, this line reads:

if(!$error instanceof Mage_Shipping_Model_Rate_Result_Error) {

Digging deeper, we find the Mage_Shipping_Model_Rate_Result_Error class in app\code\core\Mage\Shipping\Model\Rate\Result\Error.php:

class Mage_Shipping_Model_Rate_Result_Error extends Mage_Shipping_Model_Rate_Result_Abstract
{

public function getErrorMessage()
{
    if (!$this->getData('error_message')) {
        $this->setData('error_message', Mage::helper('shipping')->__('This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.'));
    }
    return $this->getData('error_message');
    }
}

I can't for the life of me, nor my colleagues, find our "undefined" variable.

Admittedly, I am a Magento n00b, but understand the basics, HTML, PHP, CSS, etc., so I'm sure I can work through any answers provided.

Thank you in advance for your time and help in solving this problem.

  • Turn on the UPS shipping method logging and see if there's some sort of UPS Rating API connection error being thrown that Magento can't deal with. – Fiasco Labs Aug 6 '14 at 3:08
0

Thank you to those who took the time to read and/or respond.

As an internet obligation, I give you the findings, fixings, and results of this problem, so any IT gremlin, including you, are granted the power to invoke this spell, should you ever come across something similar in your travels.

The error log pointing back to an undefined variable was actually a red herring caused by a server issue that was preventing Magento from using certain Apache functions.

It would appear that sometime after 10:00 AM CDT yesterday our web server's OS crashed. Where the system broke down was that we didn't catch that the OS had crashed and didn't preform the server restart procedures. By not preforming the restart procedures this prevented some of the server's operations from being available when Magento needed to call on them. This caused Magento to be unable to launch the shipping procedures and fault out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.