Invalid method Mage_Page_Block_Template_Links::addLinkBlock

Article ID #1071
Revision: 1.5
Last update: 2011-08-14

The following error message is shown after upgrade:

Invalid method Mage_Page_Block_Template_Links::addLinkBlock



addLinkBlock()” method is used since Magento version instead of addWishlistLink() method.

So, the error can occur on using Magento theme with incompatible Magento version or on incomplete upgrade.


The reason is changed format of layout/wishlist.xml file. To solve this you need to update layout/wishlist.xml for your theme to the current version. The file should be located in app/design/frontend/default/<your_theme>/layout/wishlist.xml file. If there are no wishlist.xml in your theme, then check app/design/frontend/base/default/layout/wishlist.xml


Old wishlist.xml file from version contains the following section at the top:

        <reference name="top.links">
            <block type="wishlist/links" name="wishlist_link">
                <action method="addWishlistLink"></action>


The new one, from version should contain:

        <reference name="top.links">
            <block type="wishlist/links" name="wishlist_link"/>
            <action method="addLinkBlock"><blockName>wishlist_link</blockName></action>


It is needed replace the old block with the new one, and flush Magento cache at System > Cache Management to solve this issue.


Did this article help you solve your issue?

Average rating: 4.17 (18 votes)

completely useless 1 2 3 4 5 most valuable

Tags: , ,