Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Steps to reproduce:
- On the Views list page, click the Add new view button
- Configure a basic view
- Click the Save & edit button
- Make a change but don't save the view
- Go back to the Views list page
- Delete the view created above
- Click the Add new view button
- Create a new, different view (like a block instead of a page, or using a different display format) with the same name (actually, with the same machine name)
- Click the Save & edit button
- You'll be looking at the first view that was deleted
I suspect the initial view is still saved in the object cache and then that is what is being displayed when creating the second view.
Comment | File | Size | Author |
---|---|---|---|
#4 | 2031519-tests-only.patch | 1.05 KB | damiankloip |
#4 | 2031519.patch | 1.92 KB | damiankloip |
Comments
Comment #1
pplantinga CreditAttribution: pplantinga commentedJust tried this and got the expected error:
The machine-readable name is already in use. It must be unique.
Comment #2
oadaeh CreditAttribution: oadaeh commentedYou didn't perform step #6.
Comment #3
pplantinga CreditAttribution: pplantinga commentedAh. So I didn't. You're definitely right about this one.
Comment #4
damiankloip CreditAttribution: damiankloip commentedYep, this is definitely a problem. Should be pretty easy to fix, we don't inject stuff from the container for configuration entities so I think we have to do something like this. Here is failing test and with fix.
Comment #5
dawehnerPerfect
Comment #6
oadaeh CreditAttribution: oadaeh commentedYes, the patch does correct the problem.
Comment #7
Dries CreditAttribution: Dries commentedCommitted to 8.x. Thanks.
Comment #8
effulgentsia CreditAttribution: effulgentsia commentedI just noticed in #1901100: Make Edit module work with TempStore, so revisions are not saved on all atomic field edits that in that issue, the 'edit' collection indexes by uuid() rather than id(). Would it make sense to switch Views to do that as well?
Comment #9
damiankloip CreditAttribution: damiankloip commentedWe could, I would be happy either way. The main reason not to is that we upcast the tempstore data in the views UI with a param converter, which obviously uses the view name from the path to do its thing. So on that basis I would say maybe its better how it is? not sure.
Comment #10.0
(not verified) CreditAttribution: commentedUpdated issue summary. Added a missing step.