Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
menu system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
20 Jul 2013 at 08:44 UTC
Updated:
29 Jul 2014 at 22:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
amateescu commentedDo we have some steps to reproduce this? I haven't seen that code path used in a long time..
Comment #2
amateescu commentedAlso, I'm pretty sure it was working when I wrote it in the original conversion issue.. seems that it was broken by #1909418: Allow Entity Controllers to have their dependencies injected :/
Comment #3
dawehnerWell, at some point the menu_link module is not enabled, depending on your speed of your batch process. I can reproduce that on 50% of the UI installations.
Sorry I had to fix that myself, as it was too annoying.
Comment #4
dawehnerChange component.
Comment #5
pwolanin commentedThis seems to change the constructor for MenuLinkStorageController() ?
Can we look to see if the info is missing and parse it form the yaml? Better than hard-coding it.
Comment #6
pwolanin commentedHow about this much simpler version?
Comment #7
dawehnerWay better!
install_finished triggers drupal_flush_all_caches which triggers menu_router_rebuild which triggers _menu_navigation_links_rebuild so this will never fail, as you never need menu links during the installer.
Comment #8
catchThere was an issue somewhere to add _menu_navigation_links_rebuild() into menu_links module entirely, but I can't find it.
Fine with this for a quick fix since that's a much bigger change, would be good to cross-link though.
This ought to be possible to test?
Comment #9
pwolanin commented@catch - it's apparently 50/50 during install, so I'm not sure how to make a consistent test for it?
Comment #10
catchTest could look like this I think:
Have a module handler without menu_link module in the list.
Call _menu_navigation_links_rebuild()
Comment #11
amateescu commentedThat will only test that ModuleHandler::moduleExists() works, which I'm pretty sure it is already covered in the dedicated module handler tests. I don't think we can do anything more here..
Comment #12
catchHmm well it'd continue to work if the function gets refactored too, but fair enough.
Committed/pushed to 8.x.