Opened 2 years ago
Closed 5 months ago
#3486 closed defect (bug) (fixed)
The content-archive-forum.php template does not filter if the search form should be displayed
Reported by: | naxoc | Owned by: | johnjamesjacoby |
---|---|---|---|
Milestone: | 2.6.10 | Priority: | normal |
Severity: | normal | Version: | trunk |
Component: | Component - Search | Keywords: | has-patch changes-requested |
Cc: | naxoc |
Description
Other templates wrap outputting the search from in a conditional using bbp_allow_search()
. The attached patch wraps the search form in a conditional.
I copied over the div wrapper with the bbp-search-form
class that the search form is wrapped in from content-archive-topic.php
too.
Attachments (2)
Change History (7)
#1
@
2 years ago
- Keywords has-patch changes-requested added
- Milestone changed from Awaiting Review to 2.6.10
- Owner set to johnjamesjacoby
- Status changed from new to assigned
#2
@
2 years ago
Thank you for the quick reply! The inverse sounds like a much better approach :)
I've added a new patch that removes the conditional from content-archive-topic.php
instead. The class is output in form-search.php
like you say, so that is much cleaner.
As to if I'm seeing weird 🛸 stuff with search, then no not really, so all is good. We are using Jetpack search instead, so I was just going through the templates checking for search overrides (we are in the process of upgrading from 2.5 -> 2.6).
Hey @naxoc 👋 thank you kindly for opening this ticket 🙏 and attaching a patch, too 🙌 Awesome! 🌻
You are 100% correct – this inconsistency is an unintentional oversight, and we will get it corrected together 🤝
It looks like it was in r6630 when some of this related code was changed last, by me – lucky! 🤣
If I am remembering previous-me's intentions from 5 years ago 👯♂️ I believe we may want to try a patch that is essentially the inverse:
content-archive-forum.php
content-archive-topic.php
form-search.php
in any child themes for thebbp_allow_search()
check and.bbp-search-form
wrapper div, and add them there if they are missingWhat do you think? 💭
Question: in the bbPress site you are working on, were you seeing a search form when you shouldn't, none when you should, multiple forms, or something even weirder? 🛸