Skip to content

[Navigation] Category/Custom taxonomy links are not searchable in the Link inserter. #49107

Closed

Description

@costdev

Description

Originally reported in this Trac ticket.

#48740 made the directly inserted block a Page Link block.

However, when searching for categories and other taxonomies such as product_cat, these do not appear in the results. This means converting to a custom link, then searching.

This issue follows on from a discussion about this on Slack.

Quoting @jasmussen:

Rather than revert the default-to-pages, I’d just allow categories to show up when you’re searching.

Step-by-step reproduction instructions

  1. Insert a Navigation block.
  2. Click +.
  3. Search for a category name, like uncategorized.
  4. 🐞 Note that no category appears, and it's suggested that you create a draft page.

Screenshots, screen recording, code snippet

From trac:
image

Environment info

  • WordPress: trunk / 6.2 RC2
  • Gutenberg: With or without Gutenberg trunk.
  • Browser: Chrome
  • Theme: Twenty-Twenty Three

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Activity

  1. added
    [Type] Bug
    [Block] Navigation
    on Mar 15, 2023
  2. hellofromtonya commented on Mar 15, 2023

    @hellofromtonya
    Contributor

    cc @Mamaduka @ntsekouras @ndiego This bug was reported today during RC. If fixable in time, it can be included in 6.2 RC3. I put it into the 6.2 Project Board.

  3. getdave commented on Mar 15, 2023

    @getdave
    Contributor

    There is no real quick fix solution here other than not defaulting to a Page link (which was recently added) and going back to a Custom Link.

    I would recommend we go with that approach.

    The Page link variation of the Navigation Link block is set up specifically to return search results that are Pages. In a future release we could explore improving the logic in fetchLinkSuggestions to handle providing fallbacks in case a Page isn't available but I wouldn't recommend doing something like that during an RC.

    If everyone is ok with it I would vote for rolling back the PR that introduced using Page as the default.

  4. draganescu commented on Mar 16, 2023

    @draganescu
    Contributor

    I would also recommend that we revert the defaulting to page and go back to custom link. I agree with the intent behind the change but the change itself is not sufficient, because the way the block works limits searching to the type of the current navigation link variation - and that was a feature!

    Changing how all that works is likely convoluted so reverting the change to default to page should be the best step for now.

  5. scruffian commented on Mar 16, 2023

    @scruffian
    Contributor

    Created a revert here: #49126

  6. hellofromtonya commented on Mar 16, 2023

    @hellofromtonya
    Contributor

    Thank everyone for quickly assessing and resolving this issue for WP 6.2 RC3!

  7. added
    [Type] Regression
    and removed
    [Type] Bug
    on Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] Navigation[Type] Regression

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions