Quantcast
Channel: birghtyoursite » magento
Viewing all articles
Browse latest Browse all 3

Invalid argument supplied for foreach … toolbar.phtml

$
0
0

This article show how to fix the follow Magento Error for Magento 1.4.0.1 :
"There has been an error processing your request
Exception printing is disabled by default for security reasons."

"Invalid argument supplied for foreach … toolbar.phtml "

magento error description

In magento product list page , when select the "Show per page" items , got the error
"There has been an error processing your request
Exception printing is disabled by default for security reasons."
, when this happens , just go to the root/errors
change the local.xml.sample to local.xml .
Refresh the page again , the error become
"Invalid argument supplied for foreach … toolbar.phtml " .

How to fix it

Open app/design/frontend/default/yourtheme/layout/catalog.xml ,add follow line

<block type="page/html_pager" name="product_list_toolbar_pager" template="page/html/pager.phtml" />

after each

<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
</block>

then change each

<action method="setToolbarBlockName"><name>product_list_toolbar</name></action>

to

<action method="setToolbarBlockName"><name>product_list_toolbar_pager</name></action>

After all of this done , just refresh the page , thank god ! It’s work !

Notice

Please make sure disabled all cache when you start work . I also head of some people meet this problem when install magento 1.4 , hope this can help to fix this too but didn’t test . Happy reading !

Update

After post this article , i got same error on shop by brand page , after try many times test , i find a another way : open /public_html/app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php
if you see

class Mage_Catalog_Block_Product_List_Toolbar extends Mage_Core_Block_Template

just change it to

class Mage_Catalog_Block_Product_List_Toolbar extends Mage_Page_Block_Html_Pager

then update the file . Refresh the page then it work .Hope this can help you !!! Happy reading !!!

Donate

if you find it usefull for you and like it very much , please make a





to help me to write more articles .
Thanks very much.


Viewing all articles
Browse latest Browse all 3

Trending Articles