WP default search does not find pages when terms searched for are present in Yoast FAQ blocks only
- [ x ] I've read and understood the contribution guidelines.
- [ x ] I've searched for any related issues and avoided creating a duplicate issue.
Please give us a description of what happened
To Reproduce
Step-by-step reproduction instructions
- Create a page on an empty WP installation
- Add a Yoast FAQ block to the page
- Insert unqiue content wrt the page in the FAQ block
- Create a "pattern" from the block
- Save the page
- Use WP default frontend search (url path /?s=QUERYTERM from WP frontend home url) to search for the unique content, NOTE: you might have to create a WP search template for this.#### Expected results
- The page or its post id is found
Actual results
- The page isn't found
Screenshots, screen recording, code snippet
not applicable
Technical info
- If relevant, which editor is affected (or editors):
- [ x ] Block Editor
- [ x ] Gutenberg Editor
- [ ] Elementor Editor
- [ ] Classic Editor
- [ ] Other:
- Which browser is affected (or browsers):
- [ x ] Chrome
- [ x ] Firefox
- [ x ] Safari
- [ ] Other:
Used versions
- Device you are using:
- Operating system:
- PHP version:
- WordPress version:
- WordPress Theme:
- Yoast SEO version:
- Gutenberg plugin version:
- Elementor plugin version:
- Classic Editor plugin version:
- Relevant plugins in case of a bug:
Hi @via-lars Thanks for creating the issue. I tried to replicate the issue by creating a page and post with the Yoast FAQ block with Question and Answer text on it. After that, I searched and noticed that the FAQ block page was showing without any issues for the search. See: https://brushsock.s2-tastewp.com/?s=faq, https://brushsock.s2-tastewp.com/?s=question https://brushsock.s2-tastewp.com/?s=answer
If I have missed any settings or steps, please let me know.
Hi @josevarghese ,
the issue occurs when the Yoast FAQ Block inserted into the page becomes a "pattern". Then a search for content only existing in that block doesn't find posts containing that block.
I updated the original post.
Hello again, WordPress search not finding content inside pattern appears to be a general WordPress issue. It occurs for a default paragraph block as well I just found out.
Thanks for confirming that the issue occurs only when the block is changed to a pattern.
Yes, this behavior is expected in WordPress, as patterns reuse the same content across multiple pages, so those pages won't all appear in search results. Since this isn't related to the Yoast SEO plugin or the FAQ block, I'll go ahead and close this issue.