Route overlap with Examples module

Created on 30 August 2023, over 1 year ago

Problem/Motivation

The Examples → module uses paths starting with /examples.

With form_api_example it is ok but with others like ajax_example, I obtain a fatal error because the routes are overlapping.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Active

Version

1.0

Component

Miscellaneous

Created by

🇫🇷France Grimreaper France 🇫🇷

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

Comments & Activities

  • Issue created by @Grimreaper
  • 🇫🇷France pdureau Paris

    Following 🌱 [meta] Move libraries links under appearance Fixed , if we change here we change everywhere

    For example (just a proposal, let's discuss):

    Appearance
    >> UI Libraries
    >>>> Components : from /patterns to /ui/components
    >>>> Styles : from/styles to /ui/styles
    >>>> Examples: from /examples to /ui/examples
  • 🇫🇷France Grimreaper France 🇫🇷

    In this case let's use:

    /ui_suite/components
    /ui_suite/styles
    /ui_suite/examples

    To avoid any potential other namespace conflict.

  • 🇫🇷France pdureau Paris

    Not confortable for mentioning UI Suite and having an underscore in URL.

    we also need a redirect for each, to not break the links

  • 🇫🇷France Grimreaper France 🇫🇷

    having an underscore in URL.

    Ok to change with hyphen.

    we also need a redirect for each, to not break the links

    I do not understand why we would need redirect? Which links?

  • 🇫🇷France pdureau Paris

    Styleguide → module is exposing its page under /admin/appearance/

    styleguide.page:
      path: /admin/appearance/styleguide
      defaults:
        _controller: Drupal\styleguide\Controller\StyleguideController::page
        _title: 'Style guide'
      requirements:
        _permission: 'view style guides'
      options:
        _admin_route: FALSE

    Source: https://git.drupalcode.org/project/styleguide/-/blob/2.x/styleguide.rout...

    So, what about this?

    Appearance
    >> UI Libraries
    >>>> Components : from /patterns to /admin/appearance/components
    >>>> Styles : from/styles to /admin/appearance/styles
    >>>> Examples: from /examples to /admin/appearance/examples

    or something like that

  • Assigned to pdureau
  • 🇫🇷France Grimreaper France 🇫🇷

    Ok, with the last proposal.

    Currently we have admin/appearance/ui-libraries as a common page in the ecosystem.

    So should we go for:

    Appearance
    >> UI Libraries : /admin/appearance/ui-libraries
    >>>> Components : from /patterns to /admin/appearance/ui-libraries/components
    >>>> Styles : from/styles to /admin/appearance/ui-libraries/styles
    >>>> Examples: from /examples to /admin/appearance/ui-libraries/examples
    >>>> Icons: from /examples to /admin/appearance/ui-libraries/icons
    

    ???

    It may affect the breadcrumb of the pages.

  • 🇫🇷France Grimreaper France 🇫🇷

    Discussed with @pdureau,

    Appearance
    >> UI Libraries : /admin/appearance/ui
    >>>> Components : from /patterns to /admin/appearance/ui/components
    >>>> Styles : from/styles to /admin/appearance/ui/styles
    >>>> Examples: from /examples to /admin/appearance/ui/examples
    >>>> Icons: from /examples to /admin/appearance/ui/icons
    

    Keep current URLs for the moment, but change controllers to redirect to new route. And remove controller in next major version.

  • 🇫🇷France Grimreaper France 🇫🇷
  • 🇫🇷France Grimreaper France 🇫🇷
  • 🇫🇷France Grimreaper France 🇫🇷
  • 🇫🇷France Grimreaper France 🇫🇷

    I have tested, the breadcrumb is impacted, but only if the user has access to the intermediary admin pages.

  • @grimreaper opened merge request.
  • 🇫🇷France Grimreaper France 🇫🇷

    MR ready.

    Preparing other MRs on the ecosystem to synchronize merge.

  • 🇫🇷France Grimreaper France 🇫🇷
  • Issue was unassigned.
  • Status changed to Fixed about 2 months ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024