1

We saw a blank page at /checkout/* after applying SUPEE-10752 and compiling

version: 1.9.1.0

Triggering conditions:applying SUPEE-10752 + enable compiler + login as a customer, then visit /checkout/*

Just to clarify: With deactivated compiler all things went well, with activated compiler we only could see a blank cart page when logged in without any log entries (even after activating all possible logs and developer mode).

5
  • Did you get any solution ?
    – Pawan
    Commented Jul 25, 2018 at 17:04
  • disable compiler
    – jun
    Commented Jul 26, 2018 at 1:34
  • Hello @jun, did you try my solution ? If have any issue, just let me know.
    – Pawan
    Commented Jul 26, 2018 at 16:28
  • no, i commented getPasswordTimestamp
    – jun
    Commented Aug 2, 2018 at 8:38
  • @Pawan I tried your solution and it is fixing it but got another issue that when I am Registering customer and placing order, it is redirecting success page to homepage. Any fixes? Commented Apr 5, 2019 at 12:29

2 Answers 2

4

I Have got same issue some times ago and found a work around Here

You need to copy from:

/app/code/core/Mage/Customer/Helper/Data.php

To

/app/code/local/Mage/Customer/Helper/Data.php

Search function :

public function getPasswordTimestamp($customerId)
{
    /** @var $customer Mage_Customer_Model_Customer */
    $customer = Mage::getModel('customer/customer')
        ->setWebsiteId(Mage::app()->getStore()->getWebsiteId())
        ->load((int)$customerId);
    $passwordCreatedAt = $customer->getPasswordCreatedAt();

    return is_null($passwordCreatedAt) ? $customer->getCreatedAtTimestamp() : $passwordCreatedAt;
}

Replace it with:

public function getPasswordTimestamp($customerId)
{
    $resource = Mage::getSingleton('core/resource'); $resource = Mage::getSingleton('core/resource');
    $readConnection = $resource->getConnection('core_read');
    $query = 'SELECT * FROM ' . $resource->getTableName('customer_entity').' WHERE `entity_id` = '.$customerId; 
    $results = $readConnection->fetchAll($query);

    $result=$results[0]; $result=$results[0]; 
    $date_created = Varien_Date::toTimestamp($result['created_at']); 
    return $date_created;
}

After that you need to recompile and flush cache:

Note: in Blog , They explain due to patch, customer load is failed and we manually need to get created_at of current user.

1

Still investing this but by enabling the scream option on xdebug, I was able to determine that the problem is the Zend_Date class is loaded twice when compilation is enabled and the load function is called on a customer, hence the error.

On the checkout pages specifically, it is included in the __checkout.php file and the Zend_Date.php file is also included.

The replacement code above, while it allows for compilation to proceed by not loading the customer model, does not account for the new password_created_at attribute created by this patch.

Side Note: The Varien_Autoload class has the suppression operator (@) which prevents errors from being logged or displayed(!!), hence the blank page/lack of logging.

@include_once COMPILER_INCLUDE_PATH . DIRECTORY_SEPARATOR

1
  • You are very professional, tell me if have a good solution, thanks
    – jun
    Commented Aug 10, 2018 at 3:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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