Skip to content

Fix: Modules not loading when reopening a profile#8739

Merged
vadi2 merged 1 commit intodevelopmentfrom
fix-module-loading-during-profile-open
Jan 4, 2026
Merged

Fix: Modules not loading when reopening a profile#8739
vadi2 merged 1 commit intodevelopmentfrom
fix-module-loading-during-profile-open

Conversation

@vadi2
Copy link
Copy Markdown
Member

@vadi2 vadi2 commented Jan 4, 2026

Brief overview of PR changes/additions

  • Skip duplicate module detection during profile loading sequence
  • Add warning logs when module loading fails

Motivation for adding to Mudlet

PR #8039 introduced a check that blocks module installation if the module is already in mInstalledModules. During profile reopen, modules are pre-populated in mInstalledModules from the saved XML before installModulesList() runs, causing all modules to fail with "already installed" - silently, since the return value wasn't checked.

Other info (issues closed, discussion etc)

Root cause: The stale reference check added in #8039 didn't account for the profile loading path where mInstalledModules is populated before modules are actually loaded.

Test case:

  1. Create a new profile
  2. Install a module (e.g., via Module Manager)
  3. Close the profile
  4. Reopen the profile
  5. Verify module scripts/triggers/UI are present and functional

@vadi2 vadi2 requested a review from a team as a code owner January 4, 2026 11:18
@add-deployment-links
Copy link
Copy Markdown

add-deployment-links bot commented Jan 4, 2026

Hey there! Thanks for helping Mudlet improve. 🌟

Test versions

You can directly test the changes here:

No need to install anything - just unzip and run.
Let us know if it works well, and if it doesn't, please give details.

@missionz3r0
Copy link
Copy Markdown
Contributor

@vadi2 I can confirm that this fixes the issue. Local modules load and save just fine.

@vadi2 vadi2 merged commit 0826943 into development Jan 4, 2026
12 checks passed
@vadi2 vadi2 deleted the fix-module-loading-during-profile-open branch January 4, 2026 15:22
@vadi2
Copy link
Copy Markdown
Member Author

vadi2 commented Jan 4, 2026

Cherrypicked into release-4.20 branch.

vadi2 added a commit that referenced this pull request Jan 4, 2026
#### Brief overview of PR changes/additions
- Skip duplicate module detection during profile loading sequence
- Add warning logs when module loading fails

#### Motivation for adding to Mudlet
PR #8039 introduced a check that blocks module installation if the
module is already in `mInstalledModules`. During profile reopen, modules
are pre-populated in `mInstalledModules` from the saved XML before
`installModulesList()` runs, causing all modules to fail with "already
installed" - silently, since the return value wasn't checked.

#### Other info (issues closed, discussion etc)
**Root cause:** The stale reference check added in #8039 didn't account
for the profile loading path where `mInstalledModules` is populated
before modules are actually loaded.

**Test case:**
1. Create a new profile
2. Install a module (e.g., via Module Manager)
3. Close the profile
4. Reopen the profile
5. Verify module scripts/triggers/UI are present and functional
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants