ZF-11550: Zend_Navigation_Page_Mvc::isActive does not true, when route is active

Issue Type: Bug Created: 2011-07-12T14:04:00.000+0000 Last Updated: 2011-07-13T18:14:49.000+0000 Status: Resolved Fix version(s): - 1.11.9 (14/Jul/11)

Reporter: Jonathan Maron (jonathan_maron) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Navigation

  • navigation

Related issues: Attachments:


Pls see below for routes.xml and navigation.xml.

When I go to:

<pre class="literal">
<a href=""></a>

I would expect:

<pre class="literal">
<?php echo $this->activeNavigation()->get('title'); ?>
<?php echo $this->activeNavigation()->get('label'); ?>

in the View to output:

<pre class="literal">

as it does in ZF 1.11.7 and earlier.

In ZF 1.11.8,

<pre class="literal">
<?php Zend_Debug::dump($this->activeNavigation()); ?>


<pre class="literal">

and it should return:

<pre class="literal">
object(Zend_Navigation_Page_Mvc)#54 (24) { [...] }

By overwriting the method Zend_Navigation_Page_Mvc::isActive in ZF 1.11.8 with the method Zend_Navigation_Page_Mvc::isActive from ZF 1.11.7 the issue can be resolved.

The issue, it would seem, is caused by the last fix in Zend_Navigation_Page_Mvc::isActive in ZF 1.11.8.

This is a "Blocker", as it break the entire web site.


<pre class="literal">
<?xml version="1.0" encoding="UTF-8"?>



<pre class="literal">
<?xml version="1.0" encoding="UTF-8"?>



Posted by MĂ´she van der Sterre (mĂ´shevds) on 2011-07-12T18:57:23.000+0000

The reason this worked in 1.11.7 is because the route was ignored completely, and only the module/controller/action was checked.

However, changing the handling of the null parameter (for the locale in your case) will fix this issue (but I'm not sure if that is the correct thing to do).

Look at this patch on how to do that:

Posted by Jonathan Maron (jonathan_maron) on 2011-07-13T06:09:37.000+0000

I can confirm that in the case that I described, your fix resolves the issue.

Posted by Matthew Weier O'Phinney (matthew) on 2011-07-13T18:14:28.000+0000

Added a test case for the MVC nav page which failed prior to applying the patch, passed following. Merged to master and 1.11 release branch.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.