Problem/Motivation
Theme uninstall does not show the confirmation page to show what are the configurations will be deleted or updated.
Steps to reproduce
- Install standard profile
- Go to /admin/appearance
- Set Claro as the default theme
- Uninstall Olivero
Proposed resolution
We have confirmation page for module uninstall. It will show the what are configurations will be update or deleted after uninstall. Same we need to implement the confirmation page for theme uninstall.
Remaining tasks
User interface changes
Uninstalling a theme shows a confirmation page listing the configurations that will be updated or deleted.
No before since there is no form.
New Theme uninstall form:


Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3096170
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3096170-add-confirmation-page
changes, plain diff MR !12117
Comments
Comment #2
iyyappan.govindComment #3
cilefen commentedComment #10
mstrelan commentedUpdated the IS with issue template and added steps to reproduce.
Comment #11
mstrelan commentedWe already have
\Drupal\Core\Config\Entity\ConfigDependencyDeleteFormTrait::addDependencyListsToForm. We need to add the confirm form step as per\Drupal\system\Form\ModulesUninstallForm::submitFormand\Drupal\system\Form\ModulesUninstallConfirmForm::buildForm.Comment #13
mstrelan commentedAdded a first pass, seems to work from rudimentary testing. Needs test coverage.
Comment #14
longwaveCame here via #3550019: Add ThemeUninstallValidatorInterface similar to ModuleUninstallValidatorInterface which appears to be requesting the same thing.
Cleaned up the form a bit and added some tests.
Comment #16
nicxvan commentedThis feels like the extension api even if it's in the system module.
I'll try to review this.
Comment #17
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #18
longwaveComment #19
smustgrave commentedAppears to have a phpstan failures
Comment #20
penyaskitoComment #21
longwaveComment #22
nicxvan commentedOverall the direction looks great, I took a look through the code and it makes sense.
There are some relevant test failures though.
Comment #23
longwaveComment #24
nicxvan commentedI think this is ready!
I think a parameter is fine, if we do want to change that to a path part we can do that in a follow up.
I think this feature is long, long overdue, I've accidentally uninstalled themes before!
I pulled this down and manually tested each case, a missing theme, no theme parameter, a base theme of an active theme, the current default, the current admin.
I wasn't sure at first why we needed all of the guards, since the uninstall link does not show up on themes you cannot uninstall,, but you can change the parameter, so it makes sense to guard against it.
I also looked at the module uninstall confirmation and this is consistent with that form.
Comment #25
godotislateOnly took a quick look, and it looks like this is largely parallel to the module uninstall confirmation form, but do we need a usability review for this? Maybe at least screenshots for the changes?
Comment #27
catchYes screenshots would be good, they'd be needed for a usability review anyway (but I think if it's consistent with module uninstall it'd be fine to go ahead without one here - we can always tackle them at the same time).
Comment #28
sivaji_ganesh_jojodae commentedAttached are screenshots of the Theme and Module uninstall confirmation pages.
Comment #29
nicxvan commentedI'll post in the channel!
Comment #30
nicxvan commentedComment #31
nicxvan commentedComment #32
benjifisherWe discussed this issue at #3580386: Drupal Usability Meeting 2026-03-27. That issue will have a link to a recording of the meeting.
The attendees at the usability meeting were benjifisher, nicxvan, rkoller, simohell, the_g_bomb, and worldlinemine. I am giving them credit on this issue.
If you want more feedback from the usability team, a good way to reach out is in the #ux channel in Slack.
Comment #33
nicxvan commentedSome notes and recommendations from the meeting, thank you everyone for your feedback!
We should update the page title
getQuestiontoUninstall <theme name> ThemeWe should update the warning text to:
The <theme name> theme will be completely uninstalled from your site, and all data from this theme will be lost!We need to create two follow ups:
1. For the module uninstall form to update the page title depending on if one or multiple modules are being uninstalled:
Uninstall Module
Uninstall Modules
A follow up for the SDC issue discussed in #3550019: Add ThemeUninstallValidatorInterface similar to ModuleUninstallValidatorInterface
Comment #34
sivaji_ganesh_jojodae commentedBased on #32 and #33 updating tag.
Working on changing page title and warning text.
Comment #35
sivaji_ganesh_jojodae commentedI've updated the page title and warning text. Updated Test to match the same. Attached is the screenshot of the updated confirmation page.
Comment #36
nicxvan commentedI think this is ready!
I updated the screenshots in the Issue Summary based on the new one you took.
I reviewed the new commits.
This is a UI change does it need a CR?
Edit: Asked in slack and both @godotislate and @smustgrave suggested we should, so I created one.
Comment #37
nicxvan commentedTook a pass at credit too.
Comment #38
sivaji_ganesh_jojodae commented@nicxvan, I’ve added a comment on the MR. To reiterate here, the
buildForm()method is currently performing certain checks that would be more appropriately handled in the form validation layer.Comment #39
penyaskito@sivaji_ganesh_jojodae That's a confirmation form. There's no benefit to delay those checks if there's nothing you can confirm, so better redirect early. The MR is good as is.
Comment #40
godotislateNice work, everyone! This is close, just a couple comments on the MR.
Comment #41
sivaji_ganesh_jojodae commentedI've addressed the comments on the MR.
Comment #42
nicxvan commentedI don't think we want to change away from query parameters, I'm not sure why map query parameter did not work.
Comment #43
godotislateMapQueryParameter worked when I tried it locally. Maybe adding the
usestatement was missed?Comment #44
sivaji_ganesh_jojodae commentedThanks for the quick feedback on this. Yes, it was the missing
usestatement. There was a comment suggesting to use menu parameters. Anyway it is reverted to query parameters now and test is passing.Comment #45
nicxvan commentedLooks good now! Thanks!
Comment #49
godotislateCommitted and pushed 392da0f to main and 7ef1790 to 11.x. Thanks!