Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Cleanup of previous bad merge #2

Closed
wants to merge 13 commits into from
Closed

Cleanup of previous bad merge #2

wants to merge 13 commits into from

Conversation

mfacenet
Copy link
Contributor

@mfacenet mfacenet commented Sep 4, 2010

My commit cleans up some left over conflicts from a merge of a branch called farazdagi. I managed to accidentally add some foreign commits which are already in the Zend Repo to my pull request.

@weierophinney
Copy link
Member

Merged and pushed to master -- thanks!

prolic referenced this pull request in prolic/zf2 Dec 10, 2011
akrabat pushed a commit that referenced this pull request Apr 29, 2012
ezimuel added a commit that referenced this pull request May 18, 2012
EvanDotPro pushed a commit that referenced this pull request Jul 2, 2012
s/ServiceNotFoundException/ServiceNotCreatedException
weierophinney pushed a commit that referenced this pull request Jul 24, 2012
Proposed a new float random number generator
Maks3w pushed a commit that referenced this pull request Jan 23, 2013
ezimuel added a commit to zendframework/zend-session that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-log that referenced this pull request May 15, 2015
Cast argument zendframework/zendframework#2 to string when calling DOMElement constructor
ezimuel added a commit to zendframework/zend-log that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-cache that referenced this pull request May 15, 2015
ezimuel added a commit to zendframework/zend-cache that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-cache that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-cache that referenced this pull request May 15, 2015
ezimuel added a commit to zendframework/zend-soap that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-soap that referenced this pull request May 15, 2015
ezimuel added a commit to zendframework/zend-mime that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-mime that referenced this pull request May 15, 2015
ezimuel added a commit to zendframework/zend-view that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-view that referenced this pull request May 15, 2015
ezimuel added a commit to zendframework/zend-navigation that referenced this pull request May 15, 2015
ezimuel added a commit to zendframework/zend-feed that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-feed that referenced this pull request May 15, 2015
ezimuel added a commit to zendframework/zend-permissions-acl that referenced this pull request May 15, 2015
ezimuel added a commit to zendframework/zend-permissions-rbac that referenced this pull request May 15, 2015
weierophinney pushed a commit to zendframework/zend-permissions-rbac that referenced this pull request May 15, 2015
isisis added a commit to isisis/zf2 that referenced this pull request May 28, 2015
I think it's a common use case for the default navigation, to add pages and sub pages across many modules.
There's currently an issue when adding sub pages to another page that you expect to be in configuration already.
The main page could be changed to another name, could be removed or the module could be disabled inside an application architecture that uses ZF2 modules like plug-ins.

What happens in this case?

-------------------------------------------------------------
Fatal error: Uncaught exception 'Zend\Navigation\Exception\InvalidArgumentException' with message 'Invalid argument: Unable to determine class to instantiate' in /var/www/html/ebonikerp/vendor/zendframework/zendframework/library/Zend/Navigation/Page/AbstractPage.php:254 Stack trace: #0 /var/www/html/ebonikerp/vendor/zendframework/zendframework/library/Zend/Navigation/AbstractContainer.php(114): Zend\Navigation\Page\AbstractPage::factory(Array) zendframework#1 /var/www/html/ebonikerp/vendor/zendframework/zendframework/library/Zend/Navigation/AbstractContainer.php(165): Zend\Navigation\AbstractContainer->addPage(Array) zendframework#2 /var/www/html/ebonikerp/vendor/zendframework/zendframework/library/Zend/Navigation/Navigation.php(35): Zend\Navigation\AbstractContainer->addPages(Array) zendframework#3 /var/www/html/ebonikerp/vendor/zendframework/zendframework/library/Zend/Navigation/Service/AbstractNavigationFactory.php(38): Zend\Navigation\Navigation->__construct(Array) zendframework#4 [internal function]: Zend\Navigation\Service\AbstractNavigationFactory->createService(Obj in /var/www/html/ebonikerp/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php on line 946
-------------------------------------------------------------

This fix solves the problem, by ignoring a main page, when it's missing uri or mvc values, and could be used as quick fix.

For future I would like to see a validation for the pages configs, before they're being injected to navigation.
Another approach could be to add a separate "navigation-extension" configuration beside the "navigation" configuration. The "navigation-extension" configuration could be used to extend the navigation safely. The NavigationFactory would then use only the configuration parts that already have a valid existing navigation entry inside "navigation" key.
ezimuel added a commit to zendframework/zend-i18n-resources that referenced this pull request May 28, 2015
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants