- Issue created by @joachim
- 🇧🇪Belgium BramDriesen Belgium 🇧🇪
I guess the easiest fix would be to just check if the current path matches the path exactly.
$is_adv_search = current_path() === 'project/issues/search';
- Merge request !6Issue #3453225: 'Advanced search' link doesn't show if a module's name starts with 'search'Update project_issue.module → (Merged) created by BramDriesen
- Status changed to Needs review
9 months ago 1:29pm 7 June 2024 - Status changed to Needs work
9 months ago 1:31pm 7 June 2024 - Status changed to Needs review
9 months ago 1:36pm 7 June 2024 - 🇧🇪Belgium BramDriesen Belgium 🇧🇪
Since the format of the advanced search url is like
https://www.drupal.org/project/issues/search/search_api
I guess we can just check for the URL
project/issues/search/
with a trailing/
- Status changed to Needs work
9 months ago 1:51pm 7 June 2024 - 🇪🇸Spain fjgarlin
https://www.drupal.org/project/issues/search → (global advanced search for all modules) would not match that.
I think we need an or condition, something like this:
$is_adv_search = ( (current_path() === 'project/issues/search') || (strpos(current_path(), 'project/issues/search/') === 0) );
- 🇪🇸Spain fjgarlin
I tested the above suggestion here https://fjgarlin-drupal.dev.devdrupal.org/project/issues/search and here https://fjgarlin-drupal.dev.devdrupal.org/project/issues/search_api and it seems to work. So it just needs applying to the MR.
- 🇬🇧United Kingdom joachim
So:
- /project/issues/search is global advanced search
- project/issues/search/search_api is specific advanced searchand
- project/issues/search_api is plain specific search
Sounds like a regex with a \b at the end will do it.
Fortunately there is no module just called 'search'!
- 🇧🇪Belgium BramDriesen Belgium 🇧🇪
Yes, that would solve the issue for both cases
- Status changed to Needs review
9 months ago 4:45pm 7 June 2024 - Status changed to RTBC
9 months ago 5:33pm 7 June 2024 - 🇪🇸Spain fjgarlin
My test at 7 has the same code as the MR. Setting it to RTBC.
- First commit to issue fork.
-
drumm →
committed 5350f5af on 7.x-2.x authored by
BramDriesen →
Issue #3453225: “Advanced search” link doesn’t show if a module’s name...
-
drumm →
committed 5350f5af on 7.x-2.x authored by
BramDriesen →
- Status changed to Fixed
8 months ago 8:51pm 13 June 2024 Automatically closed - issue fixed for 2 weeks with no activity.