WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.24k stars 4.09k forks source link

Footnotes Do Not Appear In Search Results #61938

Open mrfoxtalbot opened 2 months ago

mrfoxtalbot commented 2 months ago

Description

Text in the footnotes does not show in search results. This is because search only queries post_title, post_content and post_excerpt and has been a known issues for 7 years. https://core.trac.wordpress.org/ticket/40341

Step-by-step reproduction instructions

  1. Add a string of text to a footnote
  2. Look up that string of text in search
  3. No results are shown

Screenshots, screen recording, code snippet

String in a footnote: Screenshot 2024-05-24 at 12 57 40

Search Results: Screenshot 2024-05-24 at 12 42 12

Environment info

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

Mamaduka commented 2 months ago

I think this is a core issue. Footnotes are stored in postmeta, which is rarely included in search queries due to performance.

In my opinion, any change we introduce here must be discussed in core tickets first.

mrfoxtalbot commented 2 months ago

Yup, I said so in the opening paragraph :)

This is because search only queries post_title, post_content and post_excerpt and has been a known issues for 7 years. https://core.trac.wordpress.org/ticket/40

I thought it made sense to open an issue for awareness as it has become more relevant with the introduction of foot notes.

I added a [Type} WP Core Ticket label.

Mamaduka commented 2 months ago

@mrfoxtalbot, I get it. But this isn't actionable in the Gutenberg plugin, so I'm unsure what purpose the issue will serve.

mrfoxtalbot commented 2 months ago

Sure, let me explain my logic: We have 20 issues labeled as [Type} WP Core Ticket: Requires an upstream change from WordPress. Core Trac ticket should be linked.

I thought this was a good example of such ticket: affects the block editor but is not directly fixable in the block editor's code and hence worth tracking but please let me know if I am misunderstanding something about this specific issue or about how this label should be used.

Thank you!