Uninstalling the module doesn't remove its config

Created on 11 May 2023, almost 2 years ago

Problem/Motivation

When you try and uninstall the module, Drupal lets you uninstall it, even when the Anchor Link is being used in one or more text formats. By comparison, if you do the same thing with the LinkIt module, Drupal prevents you from uninstalling until it has been removed from the text formats.

Additionally, once Anchor Link is uninstalled, the existing Anchor Link config within the text format yml remains, which breaks any textfields that use Ckeditor in that format, causing a JS console error: CKEDITOR.plugins.link is undefined

Steps to reproduce

* Install CK Editor Anchor Link
* Add the anchor link button to one or more text formats, eg Basic HTML
* Export your config (eg drush cex)
* Go to /admin/modules/uninstall
* Uninstall CK Editor Anchor Link

Proposed resolution

* You should not be able to uninstall CK Editor Anchor Link until it has been removed from any active formats. Here's how LinkIt prevents it:

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom nicrodgers Monmouthshire, UK

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024