Problem/Motivation

Currently core's Path modules allows to filter url aliases only by alias itself. It is often required to filter by system path, instead of alias.

The only solution I use is to query database directly, which is very inconvenient.

Proposed resolution

Add a filter for system path.

Remaining tasks

- Needs review

User interface changes

- New filter option is visible which allows to filter the results by system path.

Before

before

After

after

API changes

N/A

Data model changes

N/a

CommentFileSizeAuthor
#102 Screenshot 2024-02-29 at 4.39.16 PM.png179.48 KBsmustgrave
#102 Screenshot 2024-02-29 at 4.39.04 PM.png150.88 KBsmustgrave
#91 D9-2418755-91.patch4.41 KBkala4ek
#90 D7-2418755-90.patch4.25 KBjoseph.olstad
#90 D7_system_filter_patch_looks_like_this.png17.83 KBjoseph.olstad
#83 Screenshot from 2021-06-22 16-03-50.png126.73 KBRinku Jacob 13
#75 2418755-75.patch4.48 KBAkashKumar07
#69 interdiff-62-69.txt3.18 KBkala4ek
#69 path_alias_filter_by-2418755-69.patch5.32 KBkala4ek
#63 interdiff-52-62.txt7.21 KBSamvel
#62 interdiff-52-62.txt7.07 KBSamvel
#62 path_alias_filter_by-2418755-62.patch4.77 KBSamvel
#58 interdiff-52_58.diff6.07 KBkala4ek
#58 path_alias_filter_by-2418755-58.patch3.5 KBkala4ek
#56 interdiff-2418755-52-54.txt5.91 KBSamvel
#54 path_alias_filter_by-2418755-54.patch3.9 KBSamvel
#52 path_alias_filter_by-2418755-52.patch5.31 KBkala4ek
#46 path_alias_filter_by-2418755-46.patch5.37 KBkala4ek
#42 path_alias_filter_by-2418755-42.patch5.45 KByogeshmpawar
#42 interdiff-2418755-33-42.txt482 bytesyogeshmpawar
#39 URL aliases Drupal8 After Applying patch.png42.83 KBDinesh18
#39 URL aliases Drupal8 Before Applying patch.png39.01 KBDinesh18
#33 interdiff.txt1.78 KBkala4ek
#33 path_alias_filter_by-2418755-33.patch5.44 KBkala4ek
#32 interdiff.txt1.23 KBMunavijayalakshmi
#32 path_alias_filter_by-2418755-32.patch5.55 KBMunavijayalakshmi
#30 path_alias_filter_by-2418755-30.patch5.56 KByogeshmpawar
#25 drupal-path_alias_filter_by_system_path-2418755-25.patch5.62 KBandrey.troeglazov
#23 drupal-path_alias_filter_by_system_path-2418755-23.patch5.81 KBandrey.troeglazov
#20 drupal-path_alias_filter_by_system_path-2418755-20.patch5.43 KBandrey.troeglazov
#17 drupal-path_alias_filter_by_system_path-2418755-17.patch5.62 KBandrey.troeglazov
#14 drupal-path_alias_filter_by_system_path-2418755-14.patch5.45 KBmohit_aghera
#14 drupal-path_alias_filter_by_system_path-2418755-14.patch5.45 KBmohit_aghera
#1 drupal-path_alias_filter_by_system_path-2418755-1.patch4.07 KBandrey.troeglazov

Issue fork drupal-2418755

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andrey.troeglazov’s picture

Version: 7.32 » 7.x-dev
Status: Active » Needs review
FileSize
4.07 KB

Hello, I made a patch for this issue. It works fine, review this patch please.

kala4ek’s picture

Priority: Normal » Major

Really? It's still not accepted?
Can smb take care about it?

I use this patch with several projects and it's awesome!
Why it is still not accepted?

cilefen’s picture

Priority: Major » Normal
Issue tags: -path

@kala4ek It is great to hear the patch works for you. In order to move the issue along, someone must provide a peer review. Provide a detailed review and the maintainers will notice.

Also, I do not think this issue is "Major" priority according to the priority guide. It sounds like this is accurate:

Normal issues are those that are not Critical or Major; they have isolated impact and may have workarounds.

The workaround in this case is a database query. You may disagree with me. If so, make a case for why this is "Major", based on the guide.

andrey.troeglazov’s picture

kala4ek’s picture

Priority: Normal » Major
Status: Needs review » Reviewed & tested by the community

Mark this task as Major.

This task providing a better UX for creating, editing & managing path aliases.
Because now - it's very hard to find alias which contains few slashes in path.

stefan.r’s picture

Version: 7.x-dev » 8.2.x-dev
Status: Reviewed & tested by the community » Active

Shouldn't this go into 8.x first?

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

joseph.olstad’s picture

Issue tags: +Needs backport to D7

I might take a stab at a backport to D7

joseph.olstad’s picture

Issue tags: -Needs backport to D7

Woops, just realized it already is a D7 patch.

+1 for this functionality to be added to D7/D8

joseph.olstad’s picture

Status: Active » Reviewed & tested by the community

RTBC the D7 patch,
great work. This should definately be done in D8 as well if it hasn't already been done.

joseph.olstad’s picture

Status: Reviewed & tested by the community » Needs work

D8 needs work

joseph.olstad’s picture

Just confirmed that this functionality is also needed for D8 as well as D7.

Without this patch its really hard to find url aliases. Especially if you have 10000 pages with the string 'news' in it and you're searching for the one url alias for the 'news' page.

The only way to use the UI is if you know the system path to filter by that. This patch allows filtering by system path, so without it, you'd have to do a database query to find the url alias making the GUI pretty pointless. This patch adds a radio box option with the extra filter option, very helpful usability improvement for Drupal. I see no regression with the D7 patch, it works like a dream. D8 also needs it.

mohit_aghera’s picture

The last submitted patch, 14: drupal-path_alias_filter_by_system_path-2418755-14.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 14: drupal-path_alias_filter_by_system_path-2418755-14.patch, failed testing.

andrey.troeglazov’s picture

Hello,
@mohit_aghera seems your patch is not working.
I`ve fixed it, for me it works ok.
Thanks.

andrey.troeglazov’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 17: drupal-path_alias_filter_by_system_path-2418755-17.patch, failed testing.

andrey.troeglazov’s picture

andrey.troeglazov’s picture

Status: Needs work » Needs review
IRuslan’s picture

Status: Needs review » Needs work

Couple of corrections about translations:
* Use $this->t() for translation within buildForm().
* Seems, by default translation for 'Path alias' string in buildForm() is missed.
* Better to set up a default value for filter type (e.g. 'alias').

andrey.troeglazov’s picture

Hello,
@IRuslan, thank you for your review,
I`ve attached the patch with corrections.

andrey.troeglazov’s picture

Status: Needs work » Needs review

The last submitted patch, 23: drupal-path_alias_filter_by_system_path-2418755-23.patch, failed testing.

kala4ek’s picture

Status: Needs review » Reviewed & tested by the community

Tested on 8.3.x and 8.2.6
Works well for me.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 25: drupal-path_alias_filter_by_system_path-2418755-25.patch, failed testing.

yogeshmpawar’s picture

Assigned: Unassigned » yogeshmpawar
yogeshmpawar’s picture

Assigned: yogeshmpawar » Unassigned
Status: Needs work » Needs review
FileSize
5.56 KB

Rerolled & removed some coding standard issues from last patch.

Munavijayalakshmi’s picture

Assigned: Unassigned » Munavijayalakshmi
Status: Needs review » Needs work
+++ b/core/modules/path/src/Form/PathFilterForm.php
@@ -20,17 +20,30 @@ public function getFormId() {
+    $filter_type = array(
+      'alias' => $this->t('Alias'),
+      'source' => $this->t('Source'),
+    );
+    $form['basic']['type'] = array(
+      '#type' => 'radios',
+      '#options' => $filter_type,
+      '#title' => $this->t('Choose your filter'),
+      '#title_display' => 'invisible',
+      '#default_value' => !empty($type) ? $type : 'alias',
+      '#maxlength' => 128,
+      '#size' => 25,
+    );

@@ -55,7 +68,10 @@ public function buildForm(array $form, FormStateInterface $form_state, $keys = N
+      'query' => array(
+        'search' => trim($form_state->getValue('filter')),
+        'type' => trim($form_state->getValue('type')),
+      ),

use short array syntax (new coding standard).

Munavijayalakshmi’s picture

Assigned: Munavijayalakshmi » Unassigned
Status: Needs work » Needs review
FileSize
5.55 KB
1.23 KB
kala4ek’s picture

andrey.troeglazov’s picture

Status: Needs review » Reviewed & tested by the community

Works for me ok on 8.4.x.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 33: path_alias_filter_by-2418755-33.patch, failed testing.

kala4ek’s picture

Status: Needs work » Needs review

Re-roll for #33

joelpittet’s picture

@kala4ek What's the idea behind the limit of 50?

hkirsman’s picture

Tx, works like a charm! If I just had found this patch earlier :)

Dinesh18’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
39.01 KB
42.83 KB

I have tested the patch mentioned in comment #33 and it is working as expected.
Looks like RTBC. PFA screenshots before and after applying the patch.

joseph.olstad’s picture

someone should reroll the patch, removing the limit of 50
as per comment #37

yogeshmpawar’s picture

Assigned: Unassigned » yogeshmpawar
yogeshmpawar’s picture

Re-roll the patch, removing the limit of 50 as per comment #37.

tstoeckler’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: +Needs usability review

I think this could use a review by the usability team. Luckily this already has before/after screenshots that are available in the file list in the issue summary, so hopefully that's enough for someone from the usability team to make a call on this.

hkirsman’s picture

Only thing that's may be confusing is if its's radio button then either one them should mandatory. No? When you arrive at the alias page, there's nothing selected. Does that mean it searches from both source and alias?

Dinesh18’s picture

Status: Needs review » Needs work

When none of them is selected, it searches from Alias.
I agree with @hkirsman, one of the field should be selected by default. I would suggest, we should select Alias by default.
I would suggest changing the name of Source to Alias would be more meaningful.
Changing the status to Needs Work.

kala4ek’s picture

Status: Needs work » Needs review
FileSize
5.37 KB

There is updated patch regarding #44, #45 comments.

yoroy’s picture

I agree this is not a super useful filter as it is now.

But I don't think it's very clear "source" and "alias" mean. In the table header it says "System" instead of "source", should these not use the same label?

Why not search both aliases and system paths by default and not expose a UI for it? You could then sort on "system" to group system paths and aliases

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

dsutter’s picture

RTBC+ patch #1 for D7

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

joelpittet’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll
patching file core/modules/path/src/Form/PathFilterForm.php
Hunk #1 FAILED at 20.
Hunk #2 succeeded at 67 (offset 2 lines).

This needs a reroll.

@kala4ek could you address the concerns in #47?

kala4ek’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
5.31 KB

Reroll path from #46 with renaming "Source" to "System".

kala4ek’s picture

Assigned: Unassigned » kala4ek
Status: Needs review » Needs work

Why not search both aliases and system paths by default and not expose a UI for it? You could then sort on "system" to group system paths and aliases

Missed this part, will update patch soon.

Samvel’s picture

Status: Needs work » Needs review
FileSize
3.9 KB

Ho guys! Attached patch where we can search by both (alias and source). Type removed. Please review

kala4ek’s picture

Assigned: kala4ek » Unassigned
Samvel’s picture

FileSize
5.91 KB

Interdiff 54 with previous 52

Status: Needs review » Needs work

The last submitted patch, 54: path_alias_filter_by-2418755-54.patch, failed testing. View results

kala4ek’s picture

Updated for 8.6.x

Status: Needs review » Needs work

The last submitted patch, 58: interdiff-52_58.diff, failed testing. View results

kala4ek’s picture

Status: Needs work » Needs review

Just set "Needs review" again, because of failed tests caused by interdiff file.

The last submitted patch, 58: path_alias_filter_by-2418755-58.patch, failed testing. View results

Samvel’s picture

Samvel’s picture

FileSize
7.21 KB

Corrected interdiff

joelpittet’s picture

Issue summary: View changes
joelpittet’s picture

Status: Needs review » Reviewed & tested by the community

Allows searching by either system path or alias and one field. I like it:)

catch’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/lib/Drupal/Core/Path/AliasStorage.php
diff --git a/core/lib/Drupal/Core/Path/AliasStorageInterface.php b/core/lib/Drupal/Core/Path/AliasStorageInterface.php
index 398ce07..525a96b 100644

index 398ce07..525a96b 100644
--- a/core/lib/Drupal/Core/Path/AliasStorageInterface.php

--- a/core/lib/Drupal/Core/Path/AliasStorageInterface.php
+++ b/core/lib/Drupal/Core/Path/AliasStorageInterface.php

+++ b/core/lib/Drupal/Core/Path/AliasStorageInterface.php
+++ b/core/lib/Drupal/Core/Path/AliasStorageInterface.php
@@ -141,7 +141,7 @@ public function aliasExists($alias, $langcode, $source = NULL);

@@ -141,7 +141,7 @@ public function aliasExists($alias, $langcode, $source = NULL);
   public function languageAliasExists();
 
   /**
-   * Loads aliases for admin listing.
+   * Loads paths for admin listing.
    *
    * @param array $header
    *   Table header.
@@ -152,7 +152,7 @@ public function languageAliasExists();

@@ -152,7 +152,7 @@ public function languageAliasExists();
    * @return array
    *   Array of items to be displayed on the current page.
    */
-  public function getAliasesForAdminListing($header, $keys = NULL);
+  public function getPathsForAdminListing($header, $keys = NULL);
 

Since there's an interface here, we should duplicate the method and deprecate rather than the direct rename.

Berdir’s picture

This actually seems like an interface that has fully customized implementations, so while it is currently not explicitly tagged as @api or so, it would still likely break custom implementations that store aliases in Redis/MongoDB or so.

joelpittet’s picture

Would it be acceptable to just include the condition and leave the names as "Aliases"?

Sorry I didn't see the API change on my review, only the functionality.

kala4ek’s picture

FileSize
5.32 KB
3.18 KB

I think that marking the existing method as "deprecated" is better than just updating it.
Here are new patch and interdiff from #62.

kala4ek’s picture

Status: Needs work » Needs review

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

joelpittet’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll
AkashKumar07’s picture

Reroll of #69.

kala4ek’s picture

Issue tags: -Needs reroll

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

joseph.olstad’s picture

patch 75 for D8 doesn't seem to do anything, not sure why, it applies cleanly though

the D7 patch works perfectly as advertised

joseph.olstad’s picture

ok patch 75 actually seems to work but it isn't as good as the D7 patch
with the D7 patch it is possible to specify which filter to use but the D8 patch 75 does either or in the same input box.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

izmeez’s picture

Is this a duplicate of #2039709: Forward slash in filter aliases in url alias overview doesn't work or are both fixes needed for Drupal 7?

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Rinku Jacob 13’s picture

I can't apply patch#75 for drupal 9.3.x-dev.getting error while applying the patch

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

joseph.olstad’s picture

Status: Needs review » Needs work

The D7 patch is still good, but the Symfony patch needs a major reroll, I looked at rerolling it but everything moved around and was changed since 8.9.x. Someone else maybe will get to it before I do.

ressa’s picture

A related issue, which also improves the user experience, is #2732315: Add ID column to URL aliases admin page UI table, in case it makes sense to take care of both issues at the same time.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

joseph.olstad’s picture

This patch works perfectly in D7, the D10/D11 version of this patch should be re-written using the D7 patch improvement behavior as a guide on what should be done for D10/D11.

Since patch #75 no longer applies, and when it did apply it was inferior to the D7 patch, please refer to the D7 patch for how this should behave.

The D7 patch needed a reroll .

Here's a screenshot of how it looks like in D7, this behavior is what the D11 patch should try to achieve:

Try to make D11 do this

kala4ek’s picture

Simple and working patch for 9.5.x.
Added new separate filters by system path and language.
No test were changed or added, feel free to add, like during last 8 years :)

joseph.olstad’s picture

Issue tags: +Needs tests

Thanks @kala4ek

patch #91 also applies cleanly with only a little bit of fuzz against the 11.x branch.

joseph.olstad’s picture

The test for this needs to be updated to cover the two filtering options. Then provide a tests only patch and we can compare the results with the whole solution. Tests only changes should fail and then with everything is including the test changes the pipeline should pass 100%.

mohit_aghera’s picture

- Fixed the test case failures in the patch.
- Added new test case to filter the system path.
- Hiding all the patches except images for further confusion since we are following MR approach now.

@joseph.olstad:
Regarding test-only patch.
I feel it might not need because we are adding new option to filter form.
Since filter form element isn't available on the 11.x branch, it will always fail.
In that case, can we skip adding `test-only.patch`?

kala4ek’s picture

- Hiding all the patches except images for further confusion since we are following MR approach now.

It's a wrong approach, patches still needed, at least to be able to use it in ongoing projects with composer.

joseph.olstad’s picture

@kala4ek,
hiding the patches from the issue doesn't prevent them from being used with Composer.

With that said, the Merge Request also offers a patch.

Here it is:
https://git.drupalcode.org/project/drupal/-/merge_requests/6444.patch

If you navigate to the merge request, click the blue code button, the patch link is down below.

joseph.olstad’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs tests

@mohit_aghera , great work on the tests, thank you.

I don't think this functionality needs a change request but perhaps a core maintainer would ask for one. Not sure on the procedure here for that. With that said, the MR is ready and is passing tests.

joseph.olstad’s picture

Also great work @kala4ek on the functionality for 11.x

poker10’s picture

@kala4ek Here are some information about the transition from patches to MR: #3412417: Disable DrupalCI testing , including a possibility to link to static MR diffs (but this needs to be implemented in Gitlab). However linking patches from 3rd party sites is not recommended and you should download a separate copy of the patch locally.

catch’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: +Needs screenshots

The code and tests both look fine, but this needs a screenshot of the functionality - the only screenshot is from Drupal 7 with a different implementation.

smustgrave’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs screenshots
FileSize
150.88 KB
179.48 KB

Added screenshots.

catch’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: +Needs usability review

The 'not specified' on the language filter looks a bit confusing especially with no label. I didn't think this needed usability review with just the system path filter, but with that change it probably does. Moving back to CNR for that.

smustgrave’s picture

Status: Needs review » Needs work

rkoller brought up a good point but the comment in #47 doesn't appear to be answers

I agree this is not a super useful filter as it is now.

But I don't think it's very clear "source" and "alias" mean. In the table header it says "System" instead of "source", should these not use the same label?

Why not search both aliases and system paths by default and not expose a UI for it? You could then sort on "system" to group system paths and aliases

joseph.olstad’s picture

Why not search both aliases and system paths by default and not expose a UI for it? You could then sort on "system" to group system paths and aliases

Easy to answer why not, when there's over 10,000 aliases your results get lost. A filter option at the offset is easier to understand than a sort on system.

The UI improvement as-is is good. make the label changes you want but I still want a filter option. My clients sites have over 10,000 aliases I don't want to be paging through results to find what I'm looking for.

I say go with a simple improvement as proposed now and then later on make a new ticket to add exposed filter options such as "exact match" , "contains", "starts with" and "ends with".

It's already been 9 years to get this far. Lets make a small improvement as proposed, make the label change as you want and move forward.

Can it be better? Yes, it can always be better.
Is what we've done an improvement? Yes

9 years and counting

rkoller’s picture

Issue tags: -Needs usability review

Usability review

We discussed this issue at #3432993: Drupal Usability Meeting 2024-03-29. The recording can be found at: https://www.youtube.com/watch?v=1xmloMqjaw0.

For the record, the attendees at the usability meeting were @AaronMcHale, @benjifisher, @BlackBamboo, @rkoller, and @shaal.

If you want more feedback from the usability team, a good way to reach out is in the #ux channel in Slack.

There was a general consensus around the group having separate filters on the URL aliases page is a good and useful thing, since there are particular cases where it is useful being able to restrict and target the search for one particular column. So this feature is a definite improvement to the current state. We've found a few noteworthy details:

  • The terminology is inconsistent on the page. h1 and page title use URL aliases, the help text and field set label alias, the place holder path alias, and the table column header again alias. Changing the h1 would entail potentially many changes to the docs. Therefore the idea was simply to adjust the term used for the placeholder (path alias) and change it to alias. That way the usage of the term alias on the page for the help text, field set label, placeholder and column header is consistent and could also be considered as the shorthand of the overall title URL alias used in the h1 and page title.
  • In a similar vein, there is also an inconsistency for the path terminology. A detail we've missed during the meeting and I've noticed while writing up the comment. The help text is using the term URL path while the placeholder and column header is using the term system path. In the subsequent discussion on Slack there was a clear consensus between @benjifisher and me that this should ideally be consistent. But which of the two would be the better choice we were uncertain about - it would have to be further discussed and tested. It also has to be added that both terms URL path and system path are both used more or less equally across Drupal Core. One detail in favor of URL path, URL path and URL alias would be a consistent pattern for both of them and URL provides the overall context. But still the recommendation is to move the discussion to a mandatory follow up issue.
  • The group agreed to the concern raised in #103. On the instance we've tested and discussed the issue on I've created a few nodes and corresponding path aliases with no multilingual modules installed. After installing a second language aside English the language column showed none for all those already existing URL aliases, and the select field with the default option - Not specified - mentioned by @catch showed up.
    If technically possible the group agreed recommending removing the placeholder text and use labels for the two input fields as well as the select field instead. That way the context would be at least easier to grasp for the default option of the select field.
  • In regards of the options - Not specified - and - Not applicable - the meaning of those options was not clear to the group. At first we thought none applicable would equal to nodes with language none but turned out it resulted in no results at all. Same if you add a string to the url alias field or system path containing strings used on one of the language none nodes. Somehow you get no result at all for - not applicable -. But since the two terms are not only used for the URL aliases filter and that ambiguity also applies to other pages and contexts, we've agreed to create a follow up issue to discuss that micro copy problem more holistically and make those two options more comprehensible in regards of function and meaning.
  • Speaking of the more holistic context, if you compare the filter options on for example admin/content with the options available on the URL aliases page you also notice for one that the filters on the content page also have an - Anything - option and those not specified and not applicable options don't come along with dashes but - Any - is. And on the other hand the content page is using labels for fields and select fields.
    Taking a look at the MR @benjifisher noted that the select field is using a standard form element while the filter on admin/content is a View. So we wondered if it would make sense ensuring a consistent population of the select field alongside other detail on the page if it would be make sense to make the URL aliases page also a View? But completely out of the scope for this issue, but in case others on this issue agree to open up a follow up issue.
  • During the testing we've also noticed one odd misbehavior of the reset button. If you try the following:
    1. Add a term to filter for in the alias field
    2. Press the filter button
    3. Clear the field with the inline clear button
    4. Press the filter button

    problem: all URL aliases are shown but so is the reset button that remains shown, but it should be hidden instead.