This is a really minor bug, if you try to duplicate a view an input field gives you the option to alter the name. Once you've decided a fancy new name and click duplicate, you will see the next page with the correct machine_name, but the view name is still the old one.
Reproduce:
* open admin/structure/views
* use the menu to duplicate any view (forward to admin/structure/views/view/content/duplicate)
* enter a fancy name and click duplicate
Result: your new view has the old name
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | interdiff-2357925-8-11.txt | 2.66 KB | zaporylie |
| #11 | duplicate_view_copies-2357925-11.patch | 1.97 KB | zaporylie |
| #8 | duplicate_view_copies-2357925-8.patch | 1.93 KB | zaporylie |
| #3 | drupal-duplicate-skip-new-name-2357925-3.patch | 637 bytes | zaporylie |
Comments
Comment #1
dawehnerGood observation!
Do you want to try to fix it?
core/modules/views_ui/src/ViewDuplicateForm.phpwould be the URL you need.Comment #2
zaporylieI will provide a patch
Comment #3
zaporylieLets try
Comment #4
lhangea commentedTested the patch. It fixes the problem.
Comment #5
alexpottSo we must be missing test coverage of this.
Comment #6
zaporylieThat's what I thought :) I will provide one later today or tomorrow.
Comment #7
zaporylieComment #8
zaporylieOk, here's the patch. This is my very first Test class so, please, review it carefully.
Comment #9
zaporylieComment #10
dawehnerIt would be great if we could name things here as duplicate, given that also the UI is talking about duplicating.
+1
Comment #11
zaporylieThanks for review. I've changed name convention from clone to duplicate.
Comment #12
jsobiecki commented+1 from me. Patch applies cleanly, all tests are green and what most important - it fixes reported bug :).
From technical side - change is quite simple - nothing suspicious here. Patch includes also new test case for test suite.
Comment #13
dawehnerCool, thank you!
Comment #14
alexpottCommitted 5a3027c and pushed to 8.0.x. Thanks!