Updated: Comment #18
Problem/Motivation
Our UI text standards: https://drupal.org/node/604342#wording say:
Use ‘Configure’, not ‘Settings’
However, on admin/config, we have "Search settings" under the "Search and meta-data" section. This needs to be changed.
Proposed resolution
Since the primary purpose of this page is now to configure SearchPage config items, which are known as "Search pages" in the UI, the admin/config menu item and page title should probably be changed to "Search pages". This is similar to most other entries on admin/config, which are nouns describing what you are configuring. Also, the breadcrumb would then be "Administration > Configuration > Search and meta-data > Search pages".
The description of the Config menu item is also outdated.
And for consistency, it would also be sensible if the URL of the config page changed from admin/search/settings to admin/search/pages. This would also make the URLs of the CRUD management screens for SearchPage config more sensible, as they would move from URLs like admin/config/search/settings/manage/(page)/disable to admin/config/search/pages/manage/(page)/disable (and similar for add/edit/etc.).
Remaining tasks
Patch exists on #17. Get it reviewed and committed.
User interface changes
The URL, page title, and menu entry for the main Search module configuration page will change, as well as the URLs for the SearchPage config entity CRUD operations.
API changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #35 | interdiff-27-35.txt | 744 bytes | Jalandhar |
| #35 | drupal8-2156661-35.patch | 21.9 KB | Jalandhar |
| #27 | interdiff.txt | 605 bytes | jsbalsera |
| #27 | 2156661-27.patch | 21 KB | jsbalsera |
| #25 | 2156661-25.patch | 20.41 KB | jsbalsera |
Comments
Comment #1
jhodgdonShould probably wait until #2047633: Move definition of menu links to hook_menu_link_defaults(), decouple key name from path, and make 'parent' explicit is finished to avoid unnecessary rerolls.
Comment #2
ianthomas_ukAlso likely to be affected by #2042807: Convert search plugins to use a ConfigEntity and a PluginBag
Comment #3
jhodgdonOther issue is taken care of.
Comment #4
jhodgdonHere's a 3-line patch, with screen shot of the relevant section of the admin/configure page. I realized the description on the Configuration page was also bogus, so fixed that too.

Comment #5
ianthomas_ukI'm not sure I agree with the switch from Search settings > Search on it's own.
I see two relevant lines in the interface text document:
The first rule is followed for buttons and tabs, but not the main menu itself, which is a list of nouns. The patch also doesn't follow this rule (there is still no verb). I interpret the second rule to apply to instances of the first and if we're not applying the first rule, then we don't need to apply the second.
The word 'settings' has presumably been added because it is grouped under a 'Search and metadata' section (the same applies to 'Regional settings' under 'Regional and language'). I think if we change this menu item, we should also change the section title and/or grouping. I'm not sure 'Url aliases' belong under 'Metadata' either.
On one of my sites, this group contains these items:
- URL aliases
- Metatag
- Robotstxt
- Search API
- URL redirects
- Vote up/down
- Voting API
- XML sitemap
- Clean URLs
What about bringing search (or it's replacement modules) up one level, and splitting the remaining group into 'URL structure' and 'Metadata'?
My menu would then be:
- Metadata
-- Metatag (meta)
-- Robotstxt (meta)
-- Vote up/down (meta)
-- Voting API (meta)
-- XML sitemap (meta)
- Search API
- URL structure
-- URL aliases (url)
-- URL redirects (url)
-- Clean URLs (url)
Comment #6
jhodgdonI am not willing to open up this discussion to the categories on admin/config -- if you want to open up that discussion, please do so in another issue.
Here's another patch that changes things to say "Configure search" instead of just "Search" , even though this makes the Search config page (while complying with our UI text standards) different from every other page on admin/configure. Is that OK or do you have objections to this as well?
Comment #7
ianthomas_ukIn my opinion neither 'Search and metadata > Search' nor 'Configure Search' is an improvement over 'Search settings', particularly if the URL remains settings. If we were to change this, then we should change 'Regional settings' at the same time and in the same way.
I can understand why you don't want to get into an endless debate about the categories on admin/config, particularly the non-search ones. What about if we keep the change as small as possible and just split Search and Metadata into their own separate categories? That's my preferred option, or closing as won't fix.
Comment #8
jhodgdonI do not think that the team that decided on this structure for Administer really wants to have it broken down into even smaller categories than what it is. On the other hand, I think they just lumped a bunch of random stuff into "Search and metadata"... But I don't want to mess with it, at least on this issue. I also don't want to just "won't fix" this issue.
So, let's see...
What if we changed the link and page title to be "Search pages"? That way, you're in "Search and metadata" area, and you're configuring Search pages, as opposed to the meta-data stuff like URL aliases. That is mostly what that Search config page is for... that and the overall indexing settings, which we can make clear in the Description.
Would that be a viable solution? Here's a patch, just in case. :)
Comment #9
ianthomas_ukI could be convinced by "Search pages". It also helps differentiate us a bit from Search API and other modules (in a bit of a meaningless way, but it's hard to explain the differences using just a name).
Shouldn't we also be changing the URL though? Or will that cause too many problems elsewhere.
Comment #10
jhodgdonYes, we should probably change the URL too... So it should be admin/config/search/pages ? That actually makes things about 1000% more rational. We'd have:
Comment #11
ianthomas_ukYes, I think that would work.
Comment #12
sidharthap@jhodgdon we have to change all the instances from test file too.
Comment #13
sidharthapChanges all instances of "admin/config/settings". let see if it pass the test.
Comment #15
jhodgdonI don't think we actually want to change the route machine name in:
Just change the paths. That might fix some of the test failures?
Comment #16
sidharthapThanks @jhodgdon. Here is the Corrected Patch.
Comment #17
yoroy commentedI do wonder how introducing a new, third alternative "pages" is an improvement over "configure" or "settings". I don't think it's that useful to talk about 'pages' in 2014 and onward :-)
And, initially I read "search" as a verb in "Search pages". I think the initial proposal to go just with "Search" is still the best.
Comment #18
jhodgdonyoroy: The point here is that what the page is configuring is "search pages". You can add a new search page, delete search pages, and configure search pages. That is what the config entities SearchPage that you are configuring are called in the UI, and that is what they actually are: individual pages where you can do searches. That is the bulk of the configuration that you can do at URL admin/config/search/settings ==> admin/config/search/pages in this patch. (There are also a few settings having to do with indexing on this config page.)
So the idea here is actually that, in line with other Config menu entries, we list on the page the noun of what we are configuring, which is "search pages" in this case.
You'll also notice in this patch that the menu entry in hook_menu_link_defaults becomes:
Search pages
Configure search pages and search indexing options.
and the URLs for the SearchPage config CRUD options make a lot more sense, as they are now:
I think this patch is good... I'm going to go ahead and mark it RTBC, although there may be some usability reviews and/or yoroy may still disagree and mark it back to needs work or needs review. Thanks!
I also made an issue summary outlining this.
Comment #19
yoroy commentedThanks for the explanation, sounds good to go!
Comment #20
alexpott2156661-16.patch no longer applies.
Comment #21
jhodgdonLooks like the patch needs a reroll.
I also just noticed that the previous patch has a bunch of:
in it. Please take those out in the reroll. We don't want to change the mode of files (making them executable etc.). Thanks!
Comment #22
ianthomas_ukEasy reroll and resolves permissions issue
Comment #23
jhodgdonThanks! Back to RTBC then. Reroll is clean.
Comment #25
jsbalseraReroll
Comment #26
jhodgdonThanks for the reroll!
The patch apply failure was due to hook_menu_link_defaults() vanishing from search.module. But it was replaced by file search.menu_links.yml.
So the changes in the #22 patch to the function search_menu_link_defaults():
now need to be made in search.menu_links.yml now. This is missing from the #25 patch.
Comment #27
jsbalseraAdding the menu_links changes
Comment #28
jsbalseraComment #29
jhodgdonPerfect, thanks!
I decided I should give this patch a manual test. So I applied the patch and did a "drush cr".
* The Configuration page looks good.
* Clicking through to admin/config/search/pages looks good.
* I tried various operations on the Content and User search pages:
- Edit - fine
- Set as default - fine
- Disable - fine
- Delete - fine
However:
- Enable and add - I got an exception:
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "search.view_user_search" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 150 of core/lib/Drupal/Core/Routing/RouteProvider.php).
Ah. This is a separate issue, not due to this patch.
#2229303: Enable/add of search pages leads to route not found exception
This patch is RTBC. Thanks!
Comment #30
jhodgdon(By the way, just to make sure, I just un-patched my site, did a drush cr, and verified that #2229303: Enable/add of search pages leads to route not found exception occurs without the patch as well. I was pretty sure it wasn't due to this patch, but now I actually tested it too.) (So this patch is still RTBC.)
Comment #32
jhodgdon27: 2156661-27.patch queued for re-testing.
Comment #33
jhodgdonThat was some random test failure...
Comment #34
alexpottSince #2178643: Indexing status can show a negative percentage of content as having been indexed landed and that patch contains
Comment #35
Jalandhar commentedUpdating the patch with reroll and changes required for #34 as said by alexpott. Please review it.
Comment #36
jhodgdonReroll is good, thanks!
Comment #37
webchickAll right, getting this in while it's hot!
Committed and pushed to 8.x. Thanks!