Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
costdev opened this issue Mar 15, 2023 · 5 comments · Fixed by #49126
Closed

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

costdev opened this issue Mar 15, 2023 · 5 comments · Fixed by #49126
Labels
[Block] Navigation Affects the Navigation Block [Type] Regression Related to a regression in the latest release

Comments

@costdev
Copy link
Contributor

costdev commented Mar 15, 2023

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

@hellofromtonya hellofromtonya added [Type] Bug An existing feature does not function as intended [Block] Navigation Affects the Navigation Block labels Mar 15, 2023
@hellofromtonya
Copy link
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.

@getdave
Copy link
Contributor

getdave commented Mar 15, 2023

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.

@draganescu
Copy link
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.

@scruffian
Copy link
Contributor

Created a revert here: #49126

@hellofromtonya
Copy link
Contributor

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

@hellofromtonya hellofromtonya added [Type] Regression Related to a regression in the latest release and removed [Type] Bug An existing feature does not function as intended labels Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Type] Regression Related to a regression in the latest release
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants