Problem/Motivation

Since #2688945: Allow removing a module's content entities prior to module uninstallation is finally in, we need to remove our custom pre-install/delete forms added from this issue #2609782: Trouble deleting and removing Paragraphs - can't uninstall .

Proposed resolution

- remove the form and related uninstall code in the .yml files form that commit
- keep and update the test to make it to work as core does now: to safely uninstall, go first to Extend > Uninstall, there should be a link that redirect to the prepare uninstall page for Paragraphs module

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tduong created an issue. See original summary.

Ginovski’s picture

Title: Remove paragraphs custom pre-install/delete forms » Remove paragraphs custom pre-uninstall/delete forms
Ginovski’s picture

Deleted the uninstall form and accordingly the link and routing from it.
Configured the test coverage.

Berdir’s picture

Nice, looks good.

I think we're going to postpone this on the 8.2.0 release, but nice to see that this works well.

johnchque’s picture

Status: Needs review » Needs work

Indeed, looks nice even though we have to wait until 8.2.0

Just small leftover:

+++ b/src/Tests/ParagraphsUninstallTest.php
@@ -36,14 +36,16 @@ class ParagraphsUninstallTest extends WebTestBase {
+  ¶

Some wrong indentation here.

Ginovski’s picture

Status: Needs review » Needs work

The last submitted patch, 6: remove_pre_uninstall-2773401-6.patch, failed testing.

The last submitted patch, 6: remove_pre_uninstall-2773401-6.patch, failed testing.

The last submitted patch, 6: remove_pre_uninstall-2773401-6.patch, failed testing.

Ginovski’s picture

Ignore comment #6, now I removed the extra spaces.

Status: Needs review » Needs work

The last submitted patch, 10: remove_pre_uninstall-2773401-10.patch, failed testing.

The last submitted patch, 10: remove_pre_uninstall-2773401-10.patch, failed testing.

The last submitted patch, 10: remove_pre_uninstall-2773401-10.patch, failed testing.

miro_dietiker’s picture

FYI this is based on an 8.2 core feature, thus will be postponed for the 8.2 release.

Ginovski’s picture

Re-applying patch after the new core feature.

tduong’s picture

Status: Needs review » Needs work

Just tiny nitpicks:

  1. +++ b/src/Tests/ParagraphsUninstallTest.php
    @@ -36,14 +36,16 @@ class ParagraphsUninstallTest extends WebTestBase {
    +    $this->clickLink('Remove paragraph entities');
    

    I would move this line under the "Delete paragraphs data." block ...

  2. +++ b/src/Tests/ParagraphsUninstallTest.php
    @@ -36,14 +36,16 @@ class ParagraphsUninstallTest extends WebTestBase {
         $this->drupalPostForm('admin/modules/uninstall', ['uninstall[paragraphs]' => TRUE], t('Uninstall'));
    

    ... and move this line under the "Uninstall the paragraphs module." block.

Ginovski’s picture

miro_dietiker’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.