Problem/Motivation
Because no display is defined by this module's config, in order to add a display to the Bookmarks view, you first need to define the first display. Doing so will break the tabs at the user profile's contextual links.
Steps to reproduce
- Attempt to add a display to the provided Bookmarks view.
- Choose the Page display plugin.
- Specify the path
/users/%user/bookmarks
to match the exiting route.
Note: It is important to name the argument %user
when using contextual filters with Views Entity Form Field as is done in this view, otherwise an exception will be thrown.
Rather than adding a display, Drupal has required you to specify a display plugin (Page, Attachment, etc) for this first display now being defined. You've gone with Page, since that's most appropriate. But, notice that you haven't specified a Menu Tab.
Visit the page, and note how the contextual links disappear.
Let's fix that. Go back and edit the view, open the Menu configuration and choose Menu Tab and enable Context. Save your changes and view the page.
Now you'll see that the contextual links have returned, but that the Bookmarks tab is duplicated.
Proposed resolution
- Remove the route and links configuration defined in this module.
- Recreate the view and export.
- Ensure that the Page display plugin is used and that the path is supplied and the contextual Menu Tag is configured, replacing the route and links task configuration files.
Comment | File | Size | Author |
---|---|---|---|
#6 | bookmarks-add-view-display-3366545-6.patch | 4.57 KB | arpitk |
#3 | bookmarks-add-view-display-3366545-3.patch | 4.39 KB | jcandan |
Issue fork bookmarks-3366545
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
jcandan CreditAttribution: jcandan as a volunteer commentedThis patch removes the controller, route, and link task (contextual link, user profile tab). These are all replaced by the updated View configuration.
Comment #3
jcandan CreditAttribution: jcandan as a volunteer commentedAccidentally included a project specific change in #2. Re-rolled.
Comment #4
jcandan CreditAttribution: jcandan as a volunteer commentedPatch #3 doesn't apply the same permission rules. Need to specify a views permission handler that allows view access for owners and those with "access others bookmarks" permissions.
Comment #5
jcandan CreditAttribution: jcandan as a volunteer commentedAlso needs to add the title on the default display.
Comment #6
arpitk CreditAttribution: arpitk at Specbee commentedUpdated patch to include default view default display title.