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

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Grimreaper created an issue. See original summary.

pdureau’s picture

Following #3339666: [meta] Move libraries links under appearance, 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
grimreaper’s picture

In this case let's use:

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

To avoid any potential other namespace conflict.

pdureau’s picture

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

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

grimreaper’s picture

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?

pdureau’s picture

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

grimreaper’s picture

Assigned: Unassigned » pdureau

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.

grimreaper’s picture

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.

grimreaper’s picture

Assigned: pdureau » grimreaper
grimreaper’s picture

grimreaper’s picture

Title: Route overlap with Examples module » UI Examples: change libraries paths to avoid collisions
grimreaper’s picture

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

grimreaper’s picture

MR ready.

Preparing other MRs on the ecosystem to synchronize merge.

  • grimreaper committed 5ce6bb2f on 1.x
    Issue #3384343 by grimreaper, pdureau: UI Examples: change libraries...
grimreaper’s picture

Assigned: grimreaper » Unassigned
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.