Problem/Motivation
Vocabulary listing is not showing delete operation for vocabularies. Looking at the code it seems that the lack of such operation is intentional but I do not understand why. Add the delete operation link would be very useful
Proposed resolution
Add delete operation for vocabularies on vocabulary listing page.
Remaining tasks
Make a patch.
User interface changes
It will add the delete vocabulary link in operations links on vocabulary listing.
API changes
none.
| Comment | File | Size | Author |
|---|---|---|---|
| #45 | interdiff.txt | 2.02 KB | lauriii |
| #45 | 2469545-46.patch | 2.49 KB | lauriii |
| #37 | 2469545-patch-after.png | 261.66 KB | nayana_mvr |
| #37 | 2469545-before-patch.png | 215.18 KB | nayana_mvr |
| #33 | vocubulary after patch apply.jpg | 188.34 KB | vengadesan_s |

Comments
Comment #1
willzyx commentedComment #2
willzyx commentedComment #3
jibranI think it's there for a reason. I'm not sure about the reason maybe @Berdir should know.
Comment #4
willzyx commentedI looked #1891690: Use EntityListController for vocabularies (which introduced the class) but there seems to be no reference to why the delete operation should not be shown
Comment #5
jibranComing from #1891690-25: Use EntityListController for vocabularies the delete operation was never really there. Maybe we need to dig deeper. Can you please find the issue in which above code got added?
Comment #6
willzyx commentedI'm not sure but I think the code you've reported was inherited from drupal 7 (
taxonomy_overview_vocabularies()contains very similar code); since in d8 things have changed a lot and now that the operation is automatically added by EntityListBuilder I do not think there is a reason to remove the delete operation.Comment #7
willzyx commentedGiven that the delete operation for vocabularies was not present in 7.x and in the previous versions of and 8.x, should we categorize this issue as a feature request?
is a one-line patch and add the delete operation link would be very useful
Comment #9
umarzaffer commentedWhile reviewing this I:
1. Downloaded and applied the patch.
2. After applying patch, the 'Delete' option against vocabularies on listing page is visible and works as expected.
3. Have created a new patch with minor improvements.
Comment #10
umarzaffer commentedComment #11
RavindraSingh commentedComment #12
RavindraSingh commentedGood work @umarzaffer,
I have applied the patch manually, working as expected. Attached is the screenshot

I am still keeping the status in "needs review", beacuse I am not sure if it requires "tests".
Comment #13
umarzaffer commentedComment #19
borisson_It does still require tests. The patch also needs a reroll.
Comment #20
idebr commentedComment #26
ranjith_kumar_k_u commentedRe-rolled #20 for 9.4
Comment #28
yogeshmpawarUpdated patch will fix the test failures.
Comment #30
yogeshmpawarOne more try to fix test failures. removed deprecated drupalPostForm() method.
Comment #31
vinodhini.e commentedI applied patch #30, It's working for me.
I am attaching a screenshot before and after applying the patch.
Thanks.
Comment #32
dilliganesh commentedI've tested #30 in 9.4.x version working fine as expected. Attached the screenshot
Comment #33
vengadesan_s commentedI applied patch #30, It's works as required. Attached screenshots please check.
Comment #34
vinodhini.e commentedComment #37
nayana_mvr commentedVerified the patch #30 and tested it on Drupal version 10.1.x. The patch works fine in 10.1.x also and I have added the before and after screenshots for reference.
Before patch

After patch

Comment #38
smustgrave commentedThis issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.
FYI #31 provided screenshots so any following screenshots were duplicative work and not needed.
Testing the code I get the same as everyone else.
Test coverage seems correct and covers the use case.
Looks fine.
Comment #40
lauriiiCommitted cd94d19 and pushed to 10.1.x. Thanks!
Comment #41
smustgrave commentedFyi this just caused a random failure in #2613222: Language module shouldn't alter config in sync mode
Comment #42
smustgrave commentedAlso relooking at the patch I see t() used in the tests. Should we open a follow up to remove?
Comment #44
lauriiiThe order of the taxonomy terms on the page is not deterministic and that's what's causing the random fails. Reverting for that, and so we can also clean up #42.
Comment #45
lauriiiThis should address the random failure and #42.
Comment #46
smustgrave commentedPerfect!
Comment #48
catchCommitted d2bf0de and pushed to 10.1.x. Thanks!