Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-17650

Migrator bug prevents complete uninstallation for certain extensions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • None
    • 3.3.16
    • Migrations
    • None

      Kirk (phpBB.de) discovered that, with phpBB 3.3.16, one of his extensions failed to remove its ACP module during uninstallation. He also noted that the same issue affected one of my extensions. Subsequently, the problem was identified in two additional extensions by Kirk and one more of mine. Due to this issue, an extension cannot be reinstalled, as the ACP module remains present. Kirk determined that a change within migrator.php was the root cause of the problem. Based on this, I was able to identify the relevant commit:

      [ticket/17533] Fix reverting migrations logic

      Through further independent testing, we subsequently discovered that this bug also prevents config variables from being completely removed.

      We found that the problem occurs specifically when a migration file contains the revert_data() method, and that method includes the permission.remove migrator instruction. These issues have only arisen since version 3.3.16; prior to this, these extensions could be uninstalled without any problems.

      The following issues occur during uninstallation:

      • ACP Modules are not removed.
      • config variables are—at the very least—not completely removed.

      Observed in the following extensions:

      Findings from our tests:

      • If the change introduced to the migrator in version 3.3.16 is reverted, uninstallations proceed completely and without leaving behind any artifacts.
      • If an extension's migration file is modified for testing purposes—specifically by removing the permission.remove instruction from within revert_data()—the uninstallation also proceeds completely and without artifacts.
      • This issue is likely to occur primarily with very old extensions—specifically those created during the 3.1 to 3.2 era—since, up until a certain point, the migrator did not automatically remove permissions; consequently, developers had implemented a manual removal process.

      Reference: Migrator Bug in 3.3.16 - phpBB.de

            Unassigned Unassigned
            LukeWCS LukeWCS
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: