Skip to content

Fix: Apply _globals defaults for all bundled plugins in preview builds (fixes #207)#208

Merged
taylortom merged 1 commit into
masterfrom
issue-207
Jun 5, 2026
Merged

Fix: Apply _globals defaults for all bundled plugins in preview builds (fixes #207)#208
taylortom merged 1 commit into
masterfrom
issue-207

Conversation

@taylortom

Copy link
Copy Markdown
Contributor

Fixes #207

Fix

  • AdaptFrameworkBuild.applySchemaDefaults now defaults _globals on the course/config schema across the full bundled plugin set (preview = enabled + disabled non-theme/menu), matching what's actually in the shared prebuilt bundle. Content-item defaults stay scoped to enabled plugins. No-op for publish/export builds, which bundle only enabled plugins.

Testing

  1. With adapt-contrib-media installed but NOT enabled on a course, preview it (forcing a prebuilt-cache restore).
  2. Confirm the console no longer throws Cannot read properties of undefined (reading 'playText') from mediaLibrariesOverrides during app:dataReady, and that Page Level Progress / other extensions initialise.
  3. Check the built course/<lang>/course.json has _globals._components._media populated.
  4. Confirm a publish/export build is unchanged (only enabled plugins' globals present).

@taylortom taylortom merged commit 43c6ece into master Jun 5, 2026
2 checks passed
@taylortom taylortom deleted the issue-207 branch June 5, 2026 16:14
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 3.1.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apply _globals defaults for all bundled plugins in preview builds

1 participant