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.
Comment | File | Size | Author |
---|---|---|---|
#4 | picture-edit-broken-4.patch | 3.24 KB | Gábor Hojtsy |
#4 | interdiff.txt | 736 bytes | Gábor Hojtsy |
picture-edit-broken.patch | 2.52 KB | Gábor Hojtsy | |
picture-edit-broken-test-only.patch | 1.42 KB | Gábor Hojtsy | |
Comments
Comment #1
Gábor HojtsyComment #2
Gábor HojtsyComment #3
vijaycs85Thanks for finding this @Gábor Hojtsy. Code change looks good to me. IMHO, needs manual test to confirm and RTBC.
Comment #4
Gábor HojtsyFound one more reference to the edit path by grepping for it.
Comment #5
pplantinga CreditAttribution: pplantinga commentedI 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
Comment #6
vijaycs85Comment #7
vijaycs85Let's get this in.
Comment #8
attiks CreditAttribution: attiks commentedLooks good to me as well
Comment #9
larowlanRelated #2010290: Editing a config entity from a listing page results in a 'page not found'
Comment #10
alexpottCommitted 33c488d and pushed to 8.x. Thanks!
Comment #11
Gábor HojtsyYay, thanks!
Comment #13
Eli-T