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

  1. Attempt to add a display to the provided Bookmarks view.
  2. Choose the Page display plugin.
  3. 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

  1. Remove the route and links configuration defined in this module.
  2. Recreate the view and export.
  3. 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.

Issue fork bookmarks-3366545

Command icon 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:

    Support from Acquia helps fund testing for Drupal Acquia logo

    Comments

    jcandan created an issue. See original summary.

    jcandan’s picture

    Status: Active » Needs review
    FileSize
    4.77 KB

    This patch removes the controller, route, and link task (contextual link, user profile tab). These are all replaced by the updated View configuration.

    jcandan’s picture

    FileSize
    4.39 KB

    Accidentally included a project specific change in #2. Re-rolled.

    jcandan’s picture

    Status: Needs review » Needs work

    Patch #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.

    jcandan’s picture

    Also needs to add the title on the default display.

     display:
       default:
         ...
         display_options:
    +      title: Bookmarks
    
    arpitk’s picture

    Updated patch to include default view default display title.