Conflict of paths

Created on 7 August 2024, about 1 year ago

I need to disallow all paths /foo/*, excluding /foo/bar
My attempt:

!/foo/*
/foo/bar

Result: /foo/bar disallowed.
Is there any ways to do it?

✨ Feature request
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

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

Merge Requests

Comments & Activities

  • Pipeline finished with Failed
    about 2 years ago
    Total: 308s
    #14558
  • Pipeline finished with Failed
    about 2 years ago
    Total: 228s
    #14559
  • Pipeline finished with Success
    almost 2 years ago
    Total: 317s
    #17829
  • Pipeline finished with Success
    almost 2 years ago
    Total: 188s
    #18952
  • Pipeline finished with Success
    over 1 year ago
    Total: 193s
    #58437
  • Pipeline finished with Success
    over 1 year ago
    Total: 140s
    #103132
  • Pipeline finished with Success
    over 1 year ago
    #139257
  • Pipeline finished with Success
    over 1 year ago
    #139909
  • Pipeline finished with Success
    about 1 year ago
    Total: 185s
    #182743
  • Pipeline finished with Success
    about 1 year ago
    Total: 200s
    #214274
  • Pipeline finished with Success
    about 1 year ago
    #239357
  • Issue created by @super_romeo
  • Status changed to Closed: works as designed about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States jcontreras

    ! is to exclude the previous wild card pattern.

    For what you want to do, make sure you have the "Hide for the listed pages" checked then:

    /foo/*
    !/foo/bar

  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    Thank you for answer.

    But I wanna keep "Show for the listed pages" mode, because I know exactly only paths to show.
    My code:

    /order/*
    !/order/*/*
    /order/*/complete
    

    Is it possible?

  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    This case is covered by Condition Path β†’ module (see "Example 2").

  • Status changed to Active 12 months ago
  • πŸ‡ΊπŸ‡ΈUnited States jcontreras

    I see what you mean. I think your point is very valid. I will follow up with a new update soon to allow linear exclusion.

  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    Thank you very much. I'm looking forward to it.

  • Status changed to Needs review 12 months ago
  • πŸ‡ΊπŸ‡ΈUnited States jcontreras

    @super_romeo - I created a new major version for this as there was a lot to rewrite to accomplish this and fixed some other issues.
    Please try it and let me know if this worked for what you intended.

  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    I installed new version. And my Site branding block is disappeared. And contextual menu is corrupted.
    Please see pics.

  • πŸ‡ΊπŸ‡ΈUnited States jcontreras

    You are correct, I refined the access adjustment to the block for viewing only as it was altering some admin functions as well.
    Please update to the latest 2.2.x-dev and let me know if it works this time.
    ( you may have manually delete the module's folder from the contrib modules on your setup to force to update.)

  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    Thank you for update.

    1. "Site branding" block is still disappeared.

    2. "Site branding" block config fixed.

    3. Cases:
    a)

    !/order/*/*
    /order/*/complete
    

    /order/1/foo - hidden (OK)
    /order/1/complete - visible (OK)

    b)

    /order/*/complete
    !/order/*/*
    

    /order/1/foo - hidden (OK)
    /order/1/complete - hidden (wrong)

    I believe the path order should not depend on the path order.

  • πŸ‡ΊπŸ‡ΈUnited States jcontreras

    There is no other way it has to be in order.

    So both examples are not correct, first, you set the allowed or not-allowed setting as you need, The exclusion is to override any previous path patterns.

    Your examples should be:

    A)
    configuration is set to: [x] Hide on pages :
    /order/*/*
    !/order/*/complete

    B)
    configuration is set to: [x] Show on pages:
    /order/*/* <-- This will display your block on paths with this pattern
    !/order/*/complete <-- and this will exclude this specific path pattern, overwriting previous pattern

    But based on your original logic I think what you want is this:

    configuration is set to: [x] Show on pages:
    /order/* <-- will display on ay page after order/
    !/order/*/* <-- exception will hide on any page after order/*/
    /order/*/complete <-- This will take over the exception allowing the block to display on /order/*/complete page

  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    Thank you. Got it.
    Now all good except "Site branding block is still disappeared".

  • πŸ‡ΊπŸ‡ΈUnited States jcontreras

    What are your patterns on that block?

  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    "Hide for the listed pages"

    /trains/order/*/timetable
    /trains/order/*/timetable2
    /trains/order/*/passenger
    /trains/order/*/payment
    

    And block is hidden on /order/modification/3/aa7e50fddf30b0a5384b4b44c916f5c3/passenger.

    I think wildcard /trains/order/*/passenger wrongly applied to this path.

  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    Can I hope to have this problem fixed in the future? So that I can plan.

  • Pipeline finished with Success
    12 months ago
    Total: 133s
    #259677
  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    Working on patch now.

  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    Hello @jcontreras,
    please check.

    Tests as a bonus :)

  • Pipeline finished with Failed
    12 months ago
    Total: 494s
    #261200
  • Pipeline finished with Canceled
    12 months ago
    Total: 127s
    #261236
  • Pipeline finished with Success
    12 months ago
    Total: 137s
    #261238
  • Pipeline finished with Success
    12 months ago
    Total: 139s
    #261369
  • Pipeline finished with Success
    12 months ago
    #261914
  • πŸ‡ΊπŸ‡ΈUnited States jcontreras

    Hi @super_romeo - Sorry It's been a crazy week last week and will continue on to the next week. I am working on a large project with crazy deadline. I took a quick glance at you changes, and it looks really good.

    Since you did a lot of changes, I'll have to take closer look, pull it all and run some tests and if all good I'll do the merge.

    I'll see if I can carb some time tomorrow as of today I still got a lot to do. Thank you so much for your time on this.

  • Pipeline finished with Failed
    12 months ago
    Total: 173s
    #262733
  • Pipeline finished with Failed
    12 months ago
    Total: 530s
    #262778
  • Pipeline finished with Failed
    12 months ago
    Total: 331s
    #265525
  • Pipeline finished with Success
    11 months ago
    Total: 156s
    #266956
  • Pipeline finished with Failed
    11 months ago
    Total: 191s
    #270005
  • Pipeline finished with Failed
    11 months ago
    Total: 582s
    #271284
  • Pipeline finished with Success
    11 months ago
    Total: 187s
    #271307
  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    @jcontreras, you are welcome!

  • Pipeline finished with Failed
    11 months ago
    Total: 149s
    #274509
  • Pipeline finished with Success
    11 months ago
    #276520
  • Pipeline finished with Success
    11 months ago
    Total: 231s
    #277057
  • Pipeline finished with Success
    11 months ago
    Total: 227s
    #281086
  • Pipeline finished with Success
    10 months ago
    Total: 144s
    #295976
  • Pipeline finished with Failed
    10 months ago
    #299625
  • Pipeline finished with Success
    10 months ago
    Total: 15155s
    #301762
  • Pipeline finished with Canceled
    10 months ago
    Total: 83s
    #316041
  • Pipeline finished with Success
    10 months ago
    #318625
  • Pipeline finished with Failed
    10 months ago
    #321857
  • Pipeline finished with Success
    10 months ago
    Total: 167s
    #321936
  • Pipeline finished with Failed
    9 months ago
    Total: 158s
    #324193
  • Pipeline finished with Skipped
    9 months ago
    #324379
  • Pipeline finished with Success
    9 months ago
    Total: 150s
    #333151
  • Pipeline finished with Success
    9 months ago
    Total: 193s
    #336002
  • Pipeline finished with Skipped
    9 months ago
    #343039
  • Pipeline finished with Success
    8 months ago
    Total: 137s
    #354594
  • πŸ‡ΊπŸ‡ΈUnited States jcontreras

    I moved this to 2.2.0-alpha2 - please review.

  • Pipeline finished with Failed
    8 months ago
    Total: 158s
    #365961
  • Pipeline finished with Success
    8 months ago
    Total: 132s
    #367423
  • Pipeline finished with Failed
    8 months ago
    Total: 189s
    #368811
  • Pipeline finished with Failed
    8 months ago
    Total: 140s
    #371250
  • Pipeline finished with Failed
    8 months ago
    Total: 152s
    #378533
  • Pipeline finished with Failed
    8 months ago
    Total: 152s
    #378534
  • Pipeline finished with Failed
    8 months ago
    Total: 170s
    #378561
  • Pipeline finished with Failed
    8 months ago
    Total: 156s
    #378564
  • Pipeline finished with Skipped
    7 months ago
    #379125
  • Pipeline finished with Failed
    7 months ago
    Total: 164s
    #382599
  • Pipeline finished with Success
    7 months ago
    Total: 164s
    #382605
  • Pipeline finished with Success
    7 months ago
    Total: 240s
    #382608
  • Pipeline finished with Success
    7 months ago
    Total: 365s
    #383375
  • Pipeline finished with Success
    7 months ago
    Total: 146s
    #388573
  • Pipeline finished with Success
    7 months ago
    Total: 282s
    #388633
  • Pipeline finished with Failed
    7 months ago
    Total: 261s
    #388903
  • Pipeline finished with Failed
    7 months ago
    Total: 145s
    #404385
  • Pipeline finished with Failed
    6 months ago
    Total: 149s
    #408464
  • Pipeline finished with Failed
    6 months ago
    Total: 147s
    #416135
  • Pipeline finished with Success
    6 months ago
    Total: 178s
    #417944
  • Pipeline finished with Success
    6 months ago
    Total: 713s
    #425863
  • Pipeline finished with Success
    6 months ago
    Total: 147s
    #430716
  • Pipeline finished with Success
    5 months ago
    Total: 160s
    #433178
  • Pipeline finished with Canceled
    5 months ago
    Total: 83s
    #439241
  • Pipeline finished with Success
    5 months ago
    Total: 140s
    #440000
  • Pipeline finished with Success
    5 months ago
    Total: 161s
    #440517
  • Pipeline finished with Success
    5 months ago
    Total: 148s
    #442909
  • Pipeline finished with Failed
    5 months ago
    Total: 185s
    #443142
  • Pipeline finished with Success
    5 months ago
    Total: 260s
    #443164
  • Pipeline finished with Failed
    5 months ago
    Total: 293s
    #445897
  • Pipeline finished with Success
    5 months ago
    Total: 368s
    #445943
  • Pipeline finished with Canceled
    5 months ago
    Total: 138s
    #446658
  • Pipeline finished with Success
    5 months ago
    Total: 167s
    #448294
  • Pipeline finished with Skipped
    5 months ago
    #454001
  • Pipeline finished with Success
    4 months ago
    Total: 229s
    #460979
  • Pipeline finished with Success
    4 months ago
    Total: 139s
    #462425
  • Pipeline finished with Success
    4 months ago
    Total: 150s
    #468203
  • Pipeline finished with Success
    4 months ago
    Total: 202s
    #468903
  • Pipeline finished with Success
    4 months ago
    Total: 155s
    #469597
  • Pipeline finished with Success
    4 months ago
    Total: 181s
    #469605
  • Pipeline finished with Success
    4 months ago
    Total: 141s
    #471424
  • Pipeline finished with Success
    4 months ago
    Total: 130s
    #472293
  • Pipeline finished with Success
    4 months ago
    Total: 124s
    #472343
  • Pipeline finished with Success
    4 months ago
    Total: 169s
    #473006
  • Pipeline finished with Failed
    4 months ago
    Total: 189s
    #473052
  • Pipeline finished with Success
    4 months ago
    Total: 141s
    #476446
  • Pipeline finished with Failed
    3 months ago
    Total: 181s
    #484107
  • Pipeline finished with Canceled
    3 months ago
    #490319
  • Pipeline finished with Success
    3 months ago
    #490320
  • Pipeline finished with Success
    3 months ago
    Total: 141s
    #492823
  • Pipeline finished with Success
    about 2 months ago
    Total: 1396s
    #520931
  • Pipeline finished with Success
    about 2 months ago
    Total: 221s
    #520996
  • Pipeline finished with Success
    about 2 months ago
    #523524
  • Pipeline finished with Success
    about 1 month ago
    Total: 178s
    #532162
  • Pipeline finished with Failed
    25 days ago
    Total: 183s
    #546807
  • Pipeline finished with Success
    23 days ago
    Total: 163s
    #549118
  • Pipeline finished with Success
    17 days ago
    #553413
  • Pipeline finished with Success
    16 days ago
    Total: 118s
    #555144
  • Pipeline finished with Failed
    8 days ago
    Total: 183s
    #561546
  • Pipeline finished with Failed
    7 days ago
    Total: 225s
    #562300
  • Pipeline finished with Skipped
    3 days ago
    #564844
  • Pipeline finished with Success
    1 day ago
    Total: 179s
    #566289
  • Pipeline finished with Canceled
    1 day ago
    Total: 353s
    #566883
Production build 0.71.5 2024