Ignore specific paths

Created on 23 April 2018, about 6 years ago
Updated 28 May 2024, about 1 month ago

It would be nice to have a place to add specific paths that should be ignored by subpathauto. There are some times you want to ignore what subpathauto does. Just had a problem with taxonomy pages where my views were not working properly. Attached an initial patch to just ignore things for paths added through admin interface.

Feature request
Status

Needs work

Version

1.0

Component

Code

Created by

🇺🇸United States lemuelsantos

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇨🇦Canada NickDickinsonWilde Victoria, BC (T'So-uke lands)

    I very much am in favour of the least configurable settings possible to meet the majority use case. This setting is clear and harmless in it's default empty state and provides a potentially very useful option so I'm in favour of the feature.

    That said, this is a new feature so have a strong feeling that we shouldn't be using 'blacklist' - see also #2993575: Remove usage of "blacklist", "whitelist", use better terms instead in core with regards to existing features where it is way more complicated and compatibility issues etc. I think ignorelist would be clearest - and then can use nice verb tenses like ignored etc.

    Additionally, does need a re-roll due to other changes committed in the last couple weeks.

  • Status changed to Needs review over 1 year ago
  • 🇧🇪Belgium LOBsTerr

    1) Rerolled the patch
    2) Replace blacklist with denylist
    3) We still call "path_alias.whitelist", but it comes from path_alias module

  • Status changed to RTBC over 1 year ago
  • 🇨🇦Canada NickDickinsonWilde Victoria, BC (T'So-uke lands)

    Thanks! I like it. Going to leave open for a few days and if no one else has opinions I'll probably commit it early next week.

  • First commit to issue fork.
  • 🇮🇳India urvashi_vora Madhya Pradesh, India

    Hi @LOBsTerr,

    Tested the patch, it applied cleanly.

    urvasi@urvasi-Inspiron-15-3552:/var/www/html/contribution/drupal/web/modules/contrib/subpathauto-2964786$ git apply -v 2964786-11.patch
    Checking patch config/schema/subpathauto.schema.yml...
    Checking patch src/Form/SettingsForm.php...
    Checking patch src/PathProcessor.php...
    Checking patch subpathauto.links.menu.yml...
    Checking patch subpathauto.services.yml...
    Checking patch tests/src/Functional/SubPathautoFunctionalTest.php...
    Checking patch tests/src/Kernel/SubPathautoKernelTest.php...
    Checking patch tests/src/Unit/SubPathautoTest.php...
    Applied patch config/schema/subpathauto.schema.yml cleanly.
    Applied patch src/Form/SettingsForm.php cleanly.
    Applied patch src/PathProcessor.php cleanly.
    Applied patch subpathauto.links.menu.yml cleanly.
    Applied patch subpathauto.services.yml cleanly.
    Applied patch tests/src/Functional/SubPathautoFunctionalTest.php cleanly.
    Applied patch tests/src/Kernel/SubPathautoKernelTest.php cleanly.
    Applied patch tests/src/Unit/SubPathautoTest.php cleanly.
    

    @NickDickinsonWilde, committing the changes to save your time and efforts.

    Thanks

  • @urvashi_vora opened merge request.
  • 🇧🇪Belgium LOBsTerr

    @NickDickinsonWilde Can we already merge it ?
    It also would be nice to have a new release tagged.
    Thanks

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    20 pass
  • 🇬🇧United Kingdom mistergroove

    Hey. Great work on this guys. Have been using the solution in https://www.drupal.org/project/subpathauto/issues/2964786 Ignore specific paths RTBC till now but don't think I can use it on the 10 compatible version.

    Did this make it into the official release yet?

  • Status changed to Needs review 3 months ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.2.1 + Environment: PHP 8.1 & MySQL 5.7
    last update 3 months ago
    20 pass
  • 🇺🇦Ukraine loon Lutsk

    It is not possible to exclude 'node/*/edit' pages
    Updated patch #11

  • 🇳🇱Netherlands batigolix Utrecht

    Thanks for this great feature.

    I had some trouble understanding how it worked, so I think this needs a bit of documentation and some clearer UI texts.

    I would change the label to:

    "Ignore the following paths"

    And I would change the description to:

    "These paths will be ignored by subpathauto. Use for example '/node/*/edit' to ensure that subpathauto ignores the node edit path. You can use wilcards(*). Start each path with a forward slash '/'. Enter one path per line."

    I've read you discussed how to name the list and you settled for Denylist. Would "Ignore list" not be a better name for this?

  • Status changed to Needs work about 1 month ago
  • 🇳🇱Netherlands batigolix Utrecht
Production build 0.69.0 2024