bug: enablePlugin() not called on upgrade path #92

Closed
opened 2026-05-22 03:29:50 +00:00 by jmiller · 1 comment
Owner

Description

The install() method runs on first install and postflight() creates the article/menu setup. But on the upgrade path ($type === 'update'), enablePlugin() is never called. If the plugin was previously disabled (manually or due to a failed first install), an upgrade will not re-enable it.

Fix

Call enablePlugin() unconditionally in postflight() regardless of install vs upgrade.

Files

  • src/script.php:78-95 - install() method
  • src/script.php:121-132 - postflight() method
## Description The `install()` method runs on first install and `postflight()` creates the article/menu setup. But on the **upgrade** path (`$type === 'update'`), `enablePlugin()` is never called. If the plugin was previously disabled (manually or due to a failed first install), an upgrade will not re-enable it. ## Fix Call `enablePlugin()` unconditionally in `postflight()` regardless of install vs upgrade. ## Files - `src/script.php:78-95` - install() method - `src/script.php:121-132` - postflight() method
jmiller added the joomlapriority: highbug labels 2026-05-22 03:29:50 +00:00
Author
Owner

Testing Steps -- enablePlugin() on upgrade

Setup

  1. Install the current dev version of the plugin

Test

  1. Go to System > Plugins, find MokoJoomTOS, disable it
  2. Build and install the updated plugin ZIP (from dev branch)
  3. Go to System > Plugins, find MokoJoomTOS
  4. Expected: Plugin is Enabled after upgrade

Pass criteria

  • Upgrading re-enables a disabled plugin
## Testing Steps -- enablePlugin() on upgrade ### Setup 1. Install the current dev version of the plugin ### Test 1. Go to **System > Plugins**, find MokoJoomTOS, **disable** it 2. Build and install the updated plugin ZIP (from dev branch) 3. Go to **System > Plugins**, find MokoJoomTOS 4. **Expected:** Plugin is **Enabled** after upgrade ### Pass criteria - [ ] Upgrading re-enables a disabled plugin
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoJoomTOS#92