Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3493754
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:55:20+00:00 2026-05-18T11:55:20+00:00

Previously in Magento, the wishlist link was added using the following (in wishlist.xml): <action

  • 0

Previously in Magento, the wishlist link was added using the following (in wishlist.xml):

<action method="addWishlistLink"></action>

And you could override that and remove it using the following (in your local.xml):

<remove name="wishlist_link"/>

However, in the newest Magento, 1.4.2, they’ve changed how the wishlist link is added to the following:

<action method="addLinkBlock"><blockName>wishlist_link</blockName></action>

Anyone know how to remove the wishlist link now they’ve changed how it’s added?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T11:55:20+00:00Added an answer on May 18, 2026 at 11:55 am

    It appears there’s no publicly available way to reliably remove the wishlist link block from the layout. (you can skip to the end for a workaround)

    The addLinkBlock assumes the presence of the block that’s been passed, so using remove in the way you describe results in a fatal error being thrown

    Fatal error: Call to a member function getPosition() on a non-object in /Users/alanstorm/Sites/magento1point4.2.dev/app/code/core/Mage/Page/Block/Template/Links.php on line 112
    

    Here’s the core code that causes that error

    app/code/core/Mage/Page/Block/Template/Links.php
    public function addLinkBlock($blockName)
    {
        $block = $this->getLayout()->getBlock($blockName);
        $this->_links[$this->_getNewPosition((int)$block->getPosition())] = $block;        
        return $this;
    }
    

    This method assumes its going to be able to pull out a block by whatever name gets passed, so we can’t just remove the wishlist_link block as we could in previous versions.

    The only mechanism for removing a link appears to be the following method on the same block class

    app/code/core/Mage/Page/Block/Template/Links.php
    public function removeLinkByUrl($url)
    {
        foreach ($this->_links as $k => $v) {
            if ($v->getUrl() == $url) {
                unset($this->_links[$k]);
            }
        }
        return $this;
    }
    

    However, this is done using string comparison, and there’s no reliable way (that I know of) to generate a URL Object from a layout file, cast it as a string, and pass it into the method (this would be required, as there are numerous configuration settings that can change what the final string URL will be). That makes this method not helpful for our needs.

    So, what we can do it modify the existing wishlist_link block to use a blank or non-existant template. This way the block still renders, but it renders as an empty string. The end result is we avoid the fatal error mentioned above, but still manage to remove the link from our selected pages.

    The following would remove the link from all the pages using the default handle.

    <!-- file: local.xml -->
    <layout>
        <default> 
            <reference name="wishlist_link">
                <action method="setTemplate"><template>blank-link.phtml</template></action>         
            </reference>            
        </default>
    </layout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I upgrade my magento store 1.4.1.1 to 1.6.1.0 following instruction from this link .
I want to create a drop down option using Magento module that populate the
I have a Magento instance and I am using the following code: include_once '../app/Mage.php';
Previously, using SVN, I would have a branch that was my development branch, which
Previously, to read XML in UTF-8 encoding through xstream, I am using DomDriver as
Previously, I have an app that uses core data. I use same store url
Previously, I was passing information to a Silverlight control inside of the Page_Load method.
Previously, I asked about a clever way to execute a method on a given
Previously when executing unit tests with xunit.net / testdriven.net I could see output written
I'm trying to write a block that loads the Magento shopping cart inside of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.