Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Commented function bindCustomerLogin() out in Item.php to get rid of an 500 server error - should I worry? 
 
Esben MemeMaker
Jr. Member
 
Total Posts:  4
Joined:  2010-07-27
 

Hi all - looking to get some peace of mind here, so hope you can help.

I have built a custom theme based on Modern theme in Magento 1.5.1, installed Magento 1.6.0 on a new server, moved database and imported and activated my new theme. Got everything working, except thie weird error:

When I created a new customer or logged in with an existing one, I would initially get a blank page/error 500, but only until I reloaded the page - then the user would be created/logged in.

I tried everything short of a fresh install, cache clearing, deleting users, orders in database etc. but could not get rid of the error. Finally I just commented out the line that was giving trouble in Item.php and now everything seems to be fine.

I would like to be sure, though, so I hope you can help with reassuring me that I should’nt worry about this grin

Here is the function from Item.php (/app/code/core/Mage/Catalog/Model/Product/Compare/Item.php - I realise that I should make a copy of it and move to “local")

/**
     * Customer login bind process
     *
     * @return Mage_Catalog_Model_Product_Compare_Item
     */
    public function bindCustomerLogin()
    
{
        
/*$this->_getResource()->updateCustomerFromVisitor($this);

        Mage::helper('catalog/product_compare')->setCustomerId($this->getCustomerId())->calculate();
        return $this;*/
    
}

Here is the text from the servers error.log

PHP Fatal error:  Call to undefined method Mage_Catalog_Helper_Product_Compare::setCustomerId() in /srv/www/mememaker.com/public_html/app/code/core/Mage/Catalog/Model/Product/Compare/Item.php on line 175refererhttp://mememaker.com/index.php/customer/account/login/

I have googled the error for hours on end, but have not seen the exact error anywhere else. Obviously I don’t get this error now, since I commented out the call it mentions..

Here is a link to the doc for Mage_Catalog/Mage_Catalog_Model_Product_Compare_Item

I do, however get this error, not sure they are related, though:

client denied by server configuration: /srv/www/mememaker.com/public_html/app/etc/local.xml

I hope someone are able to help me with this!

Best,
Esben

 
Magento Community Magento Community
Magento Community
Magento Community
 
magentome
Jr. Member
 
Total Posts:  10
Joined:  2010-06-25
 

Hello Esben,

I have exactly the same problem. I tried the commenting out solution, but then the login does not work anymore. Did you find another solution to this problem? Your advice or advice from someone else who knows how to solve this, would be greatly appreciated!

Thanks and regards,
Wessel

 
Magento Community Magento Community
Magento Community
Magento Community
 
Esben MemeMaker
Jr. Member
 
Total Posts:  4
Joined:  2010-07-27
 

Hi Wessel

I am sorry to hear that you have this issue as well! I am still running with the solution mentioned in the original post, so I am afraid I don’t have an answer for you if that does not work for you.

If you find one, though, it would be great to post it as a reply here, for someone else to see. I hope you find a solution!

Best regards,
Esben

 
Magento Community Magento Community
Magento Community
Magento Community
 
VitorQA
Jr. Member
 
Total Posts:  11
Joined:  2010-08-08
 

Hey Esben, i had exaclty both problems

Disabling the function did the job for me with the login problem, and considering i dont use Compare Products i feel safe with the solution

For the client denied error i followed this guide: http://www.yireo.com/tutorials/magento/magento-administration/1322-client-denied-by-server-configuration-appetclocalxml but had to set a long time limit on cookies because of out of sync cloks on servside

Cheers

 
Magento Community Magento Community
Magento Community
Magento Community
 
sanmic
Member
 
Total Posts:  54
Joined:  2009-12-26
 

I solved it by using the code for ver. 1.5.1

public function bindCustomerLogin()
    
{
        $this
->_getResource()->updateCustomerFromVisitor($this);

        
Mage::helper(\'catalog/product_compare\')->calculate();
        return 
$this;
    
}

Seems to work fine.

Make a copy of the item.php and place it in your app/code/local.... folder

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top