Problem/Motivation

Found here #3572749: Add duplicate / clone option to the templates
the paths in the entity definition are wrong and should match the real paths from .routing.yml

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

The add form path changes from /admin/config/content/swiper_formatter/add to /admin/config/content/swiper-formatter/add for consistency with all other entity routes.

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

anybody created an issue. See original summary.

anybody’s picture

Status: Active » Needs review

Here we go!

bbu23’s picture

Status: Needs review » Needs work

Thanks @anybody, that was fast!
With this occasion, can we pls remove the static routes from the routing file, update the Entity to use the AdminHtmlRouteProvider route_provider and maybe add just some simple test that the entity paths are accessible by the expected user and non-accessible otherwise (or whatever relevant test for this bug)?

anybody’s picture

Status: Needs work » Needs review

Sorry @bbu23 - someone can do that of course, but I won't have the time in the next weeks, sorry. Too many maintained projects myself ;)

bbu23’s picture

Assigned: Unassigned » bbu23
Status: Needs review » Needs work

@anybody no problemo, I'm happy to work on it as soon as I get the chance.

bbu23’s picture

Issue summary: View changes
bbu23’s picture

While writing the tests I discovered that even a small change like this one could come with a flaw. The path for add form in the annotation was still different than the one defined in the route.

Proposed annotation path: /admin/config/content/swiper-formatter/add
VS.
Route definition: /admin/config/content/swiper_formatter/add

Even so, the original route, the one with underscore, seems to be inconsistent with the others, so this ticket will ensure that all paths have the same pattern.

  • bbu23 committed ed740bdb on 2.1.x
    test: #3573757 Add tests for SwiperFormatter Entity routing
    

  • bbu23 committed 9b21b0e4 on 2.1.x authored by anybody
    fix: #3573757 Fix wrong paths in entity definition (src/Entity/...
bbu23’s picture

Assigned: bbu23 » Unassigned
Status: Needs work » Fixed

Will be available in 2.1.0

Thank you for your contribution!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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