Hi,
I cannot assign a view (page display) to a menu.
To reproduce,
(1) install latest dev of Drupal (I used commit 9c12817)
(2) as user 1 create a view with machine name "gallery", with a page display, and save it
(3) go edit the view at admin/structure/views/view/gallery
(4) click on Menu: no menu item in the page settings area
(5) select normal menu entry
(6) I am expecting to see a drop down with available menus, but there is no such dropdown (as there is in Views for D7)
As a workaround, you can create a new menu item from the menu settings admin area.
Comment | File | Size | Author |
---|---|---|---|
#32 | 2323511-30.patch | 12.67 KB | webchick |
#30 | interdiff.txt | 3.36 KB | pfrenssen |
#28 | interdiff.txt | 2.18 KB | dawehner |
#28 | 2323511-28.patch | 13.01 KB | dawehner |
#27 | Screen Shot 2014-09-28 at 10.52.55 am.png | 85.5 KB | kattekrab |
Comments
Comment #1
alberto56 CreditAttribution: alberto56 commentedHere is a screenshot of what I mean.
Comment #2
dawehnermhhh there should be actually a parent menu selector, odd.
Comment #3
dawehnerhere is a patch.
Comment #5
dawehnerHaha, did I really thought that this is a simple issue?
Comment #7
XanoPart of the problem was that the menu parent selector did not return a selection element at all if the default value was invalid or empty.
Comment #9
dawehner@Xano
I thought this was done on purpose?
Comment #10
dawehnerThere we go.
Comment #12
dawehnerHere is a test.
Comment #13
dawehner#12 was a different issue. Reversed the out of scope/buggy change
Comment #17
XanoI don't know why it was done, but it's inconsistent with how we handle form elements elsewhere (default values do not influence the available options) and it directly prevented the selector from showing for new page displays. The only other option would have been to set a sensible parent item value in the page display by default, and to keep the value valid throughout the page's lifetime, which is harder to do.
Comment #18
dawehnerWell, this is an entire different discussion. The interface clearly says that in case you have no matching $menu_parent, the resulting array will be empy. Showing
Comment #19
dawehnerFixed it.
Comment #21
dawehnerMuh.
Comment #23
olli CreditAttribution: olli commentedreroll
Comment #24
Gábor HojtsyMarked #2343581: Not possible to assign menu item to existing view unless it already has a menu item a duplicate. That was critical, so elevating this one as well.
Comment #25
Gábor HojtsyMarking for D8MIAMS which are the issues we'd love to get solved for the D8 multilingual site building lab on Wed. We do create some views. I looked into reviewing this issue but I don't think I have the background info that would be useful to asses why all the changes are going on in blocks, displays, etc :/
Comment #26
xjmComment #27
kattekrab CreditAttribution: kattekrab commentedI just followed the instructions in the issue summary on simplytest.me - and am definitely now seeing a drop down to choose the menu.
Screen grab:
Comment #28
dawehnerComment #29
pfrenssenUse "non-existing parent" instead of "not existing parent".
Use {@inheritdoc}.
This test shouldn't be disabled.
Test is disabled.
During testing I get an exception when assigning a menu item to a Views page and then disabling the view:
Comment #30
pfrenssenI can't replicate the exception any more :-/
I fixed my remarks and did some little cleanups.
Comment #31
tstoecklerI have one question about this patch, but this is a pretty weird bug, so that shouldn't hold this up. Hence, marking RTBC.
It might be that I'm missing something but why would the
Block
display even be available at all, if block module is not installed? I.e. wouldn't it be also possible to just declareprovider = "block"
in the annotation? May be a separate issue, though.Awesome trick!!!
Comment #32
webchickHm. Trying to kick the bot a bit.
Comment #33
webchickComment #34
webchickCommitted and pushed to 8.x. Thanks!