Allow urls that contain a query to be excluded as it leads to improper breadcrumbs

Created on 11 April 2022, almost 3 years ago
Updated 3 September 2024, 7 months ago

Problem/Motivation

Menu items that link to a URL with a query parameter could lead to improper breadcrumbs based on the previous items already existing with that same URL base.

โœจ Feature request
Status

Active

Version

2.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States droath

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.

  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand xurizaemon ลŒtepoti, Aotearoa ๐Ÿ

    Needs test coverage and/or steps to reproduce.

  • Status changed to Active 8 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States jlstrecker Athens, Ohio, USA

    Steps to reproduce / testing the patch:

    • Install menu_breadcrumb 2.0.0-alpha0.
    • Enable "Show current page as link". Leave rest of settings at defaults.
    • Add breadcrumb block to all pages.
    • Create pages:
      • Second โ€” /second
      • Third โ€” /third
      • Params maybe โ€” /second/params
      • Params again โ€” /third/params
    • Set up main menu:
      • Second โ€” /second
        • No params โ€” /second/params
        • Yes params โ€” /second/params?has=1
      • Third โ€” /third
        • Yes params 2 โ€” /third/params?hello=1
        • No params 2 โ€” /third/params

    Breadcrumbs without the patch:

    • No params โ€” Second > No params
    • Yes params โ€” Second > No params
    • Yes params 2 โ€” Third > Yes params 2
    • No params 2 โ€” Third > Yes params 2

    Breadcrumbs with the patch and "Exclude menu items with query in URLs" enabled:

    • No params โ€” Second > No params
    • Yes params โ€” Second > No params
    • Yes params 2 โ€” Third > Params again
    • No params 2 โ€” Third > Params again

    This patch solve a problem for me where I had two menu links to the same search page โ€” one with no query parameters ("Search"), the other with query parameters that would narrow the search ("Specific Category") โ€” and I wanted the breadcrumb for both to be the first menu link / page title ("Search").

  • First commit to issue fork.
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia anwar_max

    anwar_max โ†’ changed the visibility of the branch 3274684-allow-urls-that to hidden.

Production build 0.71.5 2024