Problem

1. Enable picture module.
2. Add a picture mapping (details don't matter).
3. On the listing page, click the edit operation.
4. Get a "Page not found".

Why?

Entity list controllers now generate the edit operation link to be the root URL of the config entity, so that is without the edit component in the path. By making the list use the edit-less URL (as has been applied elsewhere), it works flawlessly. Edit should be/is the default tab anyway on this route.

This is the relevant code from the entity list controller:

    // Ensure the edit operation exists since it is access controlled.
    if (isset($operations['edit'])) {
      // For configuration entities edit path is the MENU_DEFAULT_LOCAL_TASK and
      // therefore should be accessed by the short route.
      $operations['edit']['href'] = $uri['path'];
    }

Proposal

Make the edit operation work on the base path. Update tests to also test on the base path to avoid such issues in the future.

This is a blocker for #2044387: Add remaining configuration entity or page into configuration translation module which is a blocker for #1952394: Add configuration translation user interface module in core.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy’s picture

Status: Active » Needs review
Gábor Hojtsy’s picture

Issue tags: +sprint
vijaycs85’s picture

Issue tags: +Needs manual testing

Thanks for finding this @Gábor Hojtsy. Code change looks good to me. IMHO, needs manual test to confirm and RTBC.

Gábor Hojtsy’s picture

FileSize
736 bytes
3.24 KB

Found one more reference to the edit path by grepping for it.

pplantinga’s picture

I can confirm that this is broken on 8.x and applying this patch + disabling module and re-enabling it fixes the problem.

+1 to RTBC

vijaycs85’s picture

vijaycs85’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Quick fix, -Needs manual testing

Let's get this in.

attiks’s picture

Issue tags: -sprint

Looks good to me as well

larowlan’s picture

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 33c488d and pushed to 8.x. Thanks!

Gábor Hojtsy’s picture

Yay, thanks!

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

Eli-T’s picture

Component: picture.module » responsive_image.module
Issue summary: View changes