Menu link gets inactive after modifying menu label
maity-kgz opened this issue · 4 comments
If you in admin panel "Menu/Menu node" modify menu label it gets inactive menu in front page.
Issue does not affect menus that has explicit route or uri.
are you saying that the link between the menu node and a content document is lost? afaik there is a long-standing bug that when you press enter in a text field, instead of submitting the form it removes the link from the tree widget. could that be what happened here? if not, which versions are you using?
Tested on 1.3 stable (locally) and also on official sandbox (http://sandbox.cmf.symfony.com/).
You just go to admin panel "Menu/Menu node" select any menu nod (except nodes that has route or uri) and modify label and submit the form by clicking UPDATE button.
oh, indeed. @wouterj it looks like the option to select the target document of a menu node is not shown in the UI. normally when a field is not editable, it should just stay unchanged. maybe something weird happens? and we should have the option to select a target document.
This is a bug in the CmfMenuBundle, so I ported it to there: symfony-cmf/menu-bundle#261
What's basically going wrong here is that we show the uri/route/content fields only based on the linkType
input option. (select "content" and things work correctly) Based on this linkType
option, we decide which link is saved to the document. As it defaults to route
for content
links (I have no idea why), the value of the route
input is saved. This is of course empty, resulting in a non-clickable link.