Conflict of paths

Created on 7 August 2024, 9 months 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 Success
    almost 2 years ago
    Total: 451s
    #14480
  • Pipeline finished with Failed
    almost 2 years ago
    Total: 308s
    #14558
  • Pipeline finished with Failed
    almost 2 years ago
    Total: 228s
    #14559
  • Pipeline finished with Skipped
    over 1 year ago
    #25428
  • Pipeline finished with Success
    over 1 year ago
    Total: 369s
    #27755
  • Pipeline finished with Success
    about 1 year ago
    #139899
  • Pipeline finished with Success
    about 1 year ago
    #139909
  • Pipeline finished with Success
    10 months ago
    Total: 200s
    #214274
  • Pipeline finished with Success
    9 months ago
    #238241
  • Issue created by @super_romeo
  • Status changed to Closed: works as designed 9 months 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 9 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 9 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
    8 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
    8 months ago
    Total: 494s
    #261200
  • Pipeline finished with Canceled
    8 months ago
    Total: 127s
    #261236
  • Pipeline finished with Success
    8 months ago
    Total: 137s
    #261238
  • Pipeline finished with Success
    8 months ago
    Total: 139s
    #261369
  • πŸ‡ΊπŸ‡Έ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 Success
    8 months ago
    Total: 156s
    #266956
  • Pipeline finished with Failed
    8 months ago
    Total: 191s
    #270005
  • Pipeline finished with Failed
    8 months ago
    Total: 161s
    #271278
  • Pipeline finished with Failed
    8 months ago
    Total: 582s
    #271284
  • Pipeline finished with Success
    8 months ago
    Total: 172s
    #271902
  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    @jcontreras, you are welcome!

  • Pipeline finished with Success
    8 months ago
    Total: 231s
    #277057
  • Pipeline finished with Success
    8 months ago
    Total: 227s
    #281086
  • Pipeline finished with Success
    8 months ago
    Total: 262s
    #281118
  • Pipeline finished with Success
    7 months ago
    Total: 372s
    #294935
  • Pipeline finished with Success
    7 months ago
    Total: 144s
    #295976
  • Pipeline finished with Skipped
    7 months ago
    #295985
  • Pipeline finished with Success
    7 months ago
    Total: 160s
    #299689
  • Pipeline finished with Success
    7 months ago
    Total: 142s
    #299848
  • Pipeline finished with Success
    7 months ago
    Total: 15155s
    #301762
  • Pipeline finished with Success
    6 months ago
    Total: 447s
    #311043
  • Pipeline finished with Success
    6 months ago
    Total: 132s
    #311549
  • Pipeline finished with Success
    6 months ago
    Total: 192s
    #315839
  • Pipeline finished with Canceled
    6 months ago
    Total: 83s
    #316041
  • Pipeline finished with Success
    6 months ago
    #318618
  • Pipeline finished with Failed
    6 months ago
    Total: 323s
    #321593
  • Pipeline finished with Failed
    6 months ago
    #321857
  • Pipeline finished with Success
    6 months ago
    Total: 167s
    #321936
  • Pipeline finished with Skipped
    6 months ago
    #324379
  • Pipeline finished with Failed
    6 months ago
    Total: 218s
    #324599
  • Pipeline finished with Success
    6 months ago
    Total: 193s
    #336002
  • Pipeline finished with Skipped
    5 months ago
    #343039
  • Pipeline finished with Success
    5 months ago
    Total: 222s
    #344216
  • Pipeline finished with Success
    5 months ago
    #348032
  • Pipeline finished with Failed
    5 months ago
    Total: 170s
    #348850
  • Pipeline finished with Success
    5 months ago
    Total: 143s
    #353976
  • Pipeline finished with Skipped
    5 months ago
    #354247
  • Pipeline finished with Success
    5 months ago
    Total: 132s
    #354466
  • Pipeline finished with Success
    5 months ago
    Total: 196s
    #354499
  • πŸ‡ΊπŸ‡ΈUnited States jcontreras

    I moved this to 2.2.0-alpha2 - please review.

  • Pipeline finished with Failed
    5 months ago
    Total: 158s
    #365961
  • Pipeline finished with Success
    5 months ago
    Total: 132s
    #367423
  • Pipeline finished with Failed
    4 months ago
    Total: 189s
    #368811
  • Pipeline finished with Failed
    4 months ago
    Total: 140s
    #371250
  • Pipeline finished with Success
    4 months ago
    #378142
  • Pipeline finished with Success
    4 months ago
    Total: 280s
    #378149
  • Pipeline finished with Failed
    4 months ago
    Total: 152s
    #378533
  • Pipeline finished with Failed
    4 months ago
    Total: 152s
    #378534
  • Pipeline finished with Failed
    4 months ago
    Total: 170s
    #378561
  • Pipeline finished with Failed
    4 months ago
    Total: 156s
    #378564
  • Pipeline finished with Failed
    4 months ago
    Total: 171s
    #378570
  • Pipeline finished with Success
    4 months ago
    Total: 215s
    #379953
  • Pipeline finished with Failed
    4 months ago
    Total: 164s
    #382599
  • Pipeline finished with Success
    4 months ago
    Total: 164s
    #382605
  • Pipeline finished with Success
    4 months ago
    Total: 240s
    #382608
  • Pipeline finished with Success
    4 months ago
    Total: 365s
    #383375
  • Pipeline finished with Failed
    4 months ago
    Total: 190s
    #388607
  • Pipeline finished with Success
    4 months ago
    Total: 282s
    #388633
  • Pipeline finished with Failed
    4 months ago
    Total: 261s
    #388903
  • Pipeline finished with Success
    3 months ago
    Total: 237s
    #401099
  • Pipeline finished with Failed
    3 months ago
    Total: 179s
    #401902
  • Pipeline finished with Success
    3 months ago
    Total: 222s
    #413390
  • Pipeline finished with Success
    3 months ago
    Total: 175s
    #414195
  • Pipeline finished with Failed
    3 months ago
    Total: 147s
    #416135
  • Pipeline finished with Success
    3 months ago
    Total: 143s
    #417924
  • Pipeline finished with Success
    3 months ago
    Total: 178s
    #417944
  • Pipeline finished with Failed
    2 months ago
    Total: 204s
    #424365
  • Pipeline finished with Success
    2 months ago
    Total: 713s
    #425863
  • Pipeline finished with Success
    2 months ago
    Total: 703s
    #425864
  • Pipeline finished with Failed
    about 2 months ago
    Total: 139s
    #436606
  • Pipeline finished with Canceled
    about 2 months ago
    Total: 83s
    #439241
  • Pipeline finished with Success
    about 2 months ago
    Total: 140s
    #440000
  • Pipeline finished with Success
    about 2 months ago
    Total: 195s
    #440218
  • Pipeline finished with Failed
    about 2 months ago
    Total: 185s
    #443142
  • Pipeline finished with Success
    about 2 months ago
    Total: 368s
    #445943
  • Pipeline finished with Canceled
    about 2 months ago
    Total: 138s
    #446658
  • Pipeline finished with Success
    about 2 months ago
    Total: 158s
    #446660
  • Pipeline finished with Success
    about 2 months ago
    Total: 195s
    #446716
  • Pipeline finished with Success
    about 2 months ago
    Total: 148s
    #447607
  • Pipeline finished with Success
    about 1 month ago
    Total: 167s
    #448294
  • Pipeline finished with Skipped
    about 1 month ago
    #454001
  • Pipeline finished with Success
    about 1 month ago
    Total: 159s
    #458333
  • Pipeline finished with Success
    28 days ago
    Total: 229s
    #460979
  • Pipeline finished with Success
    27 days ago
    Total: 139s
    #462425
  • Pipeline finished with Success
    19 days ago
    Total: 202s
    #468903
  • Pipeline finished with Success
    19 days ago
    Total: 155s
    #469597
  • Pipeline finished with Success
    19 days ago
    Total: 170s
    #469604
  • Pipeline finished with Success
    19 days ago
    Total: 181s
    #469605
  • Pipeline finished with Success
    17 days ago
    Total: 141s
    #471424
  • Pipeline finished with Failed
    17 days ago
    Total: 145s
    #471489
  • Pipeline finished with Success
    17 days ago
    Total: 150s
    #471494
  • Pipeline finished with Success
    15 days ago
    Total: 347s
    #472287
  • Pipeline finished with Success
    15 days ago
    Total: 130s
    #472293
  • Pipeline finished with Failed
    14 days ago
    Total: 189s
    #473052
  • Pipeline finished with Failed
    14 days ago
    Total: 163s
    #473307
  • Pipeline finished with Success
    10 days ago
    Total: 141s
    #476446
  • Pipeline finished with Success
    10 days ago
    Total: 141s
    #476466
Production build 0.71.5 2024