ZF-11359: Zend_Navigation_Page_Mvc::isActive is not route aware
Description
Zend_Navigation_Page_Mvc::isActive is not route aware, and will return false when the page is active, but uses a route.
Zend_Navigation_Page_Mvc::isActive is not route aware, and will return false when the page is active, but uses a route.
Comments
Posted by Môshe van der Sterre (môshevds) on 2011-05-10T20:39:54.000+0000
Unit test: http://pastie.org/1886460
Posted by Môshe van der Sterre (môshevds) on 2011-05-10T21:12:47.000+0000
Patch: http://pastie.org/1886576
Note that getDefaults is not a part of Zend_Controller_Router_Route_Interface, so the method_exists check is necessary. Also, Zend_Controller_Router_Route_Chain does not implement getDefaults, but I think that should be possible.
Posted by Kai Uwe (kaiuwe) on 2011-05-11T09:04:07.000+0000
Add patches from Môshe van der Sterre
Posted by Dolf Schimmel (Freeaqingme) (freak) on 2011-05-11T12:38:16.000+0000
Kai, I see that you assigned this issue to yourself. Does that mean you're planninng on committing it? If not, please assign it to me so I can commit the patches.
Posted by Kai Uwe (kaiuwe) on 2011-05-11T12:45:54.000+0000
Hi Dolf, Feel free to commit. It does not matter who does it! :-)
Posted by Cristian Bichis (avantis) on 2011-05-26T14:58:56.000+0000
Anyone to commit ? Seems is affecting me as well...
Posted by Dolf Schimmel (Freeaqingme) (freak) on 2011-05-26T15:09:42.000+0000
Hey Christian,
See also this tweet: https://twitter.com//…
tldr; will do so this weekend.
Posted by Cristian Bichis (avantis) on 2011-05-26T16:08:49.000+0000
Thanks Freeaqingme, take your time...
Posted by Marvin Feldmann (ganjalatte) on 2011-06-01T01:53:45.000+0000
As mentioned above this patch does not work for chained routes. I patched this issue by comparing the assembled URLs of the current route and the route used by Zend_Navigation_Page_Mvc:
Posted by Cristian Bichis (avantis) on 2011-06-02T07:40:01.000+0000
I guess would worth to check if the route is chained and only use the patch for a chained route.
This makes sense to avoid too much assemble processing....
Posted by Dolf Schimmel (Freeaqingme) (freak) on 2011-06-04T00:15:42.000+0000
This issue was assigned to me because it was about merely applying a patch. Apparently the patch does not meet the quality standards ZF aims at. I am reassigning the issue, and assume it will not be resolved before ZF2.
Of course, this is not the case if a patch shows up that also supports chained links in a performant manner. Thank you for making ZF better!
Posted by Cristian Bichis (avantis) on 2011-06-04T11:05:16.000+0000
Freeaqingme, i suggest to at least patch with the initial solution, which works for non-chained routes. Otherwise it makes sense to fully remove the isActive related features...
I mean, there is a solution which is fixing for at least many of the cases so it makes sense to either apply the patch or remove the features (which i don't think is a choice would lead to BC break).
Posted by Dolf Schimmel (Freeaqingme) (freak) on 2011-06-04T14:36:19.000+0000
Applied original patch(es). They should be released with version 1.11.8.
Committed in r24118 merged with release 1.11 branch in r24119. For the chained route stuff, please create a new issue.
Thank you for making ZF better.
Posted by Cristian Bichis (avantis) on 2011-06-04T20:12:35.000+0000
Thanks Freeaqingme.
I raised a new issue for the chained routes case:
http://framework.zend.com/issues/browse/ZF-11442