Subject of the issue
The _tooltip._position migration writes an empty string '', which is not a valid value for the _position enum in the schema. Any course migrated through this step then fails modern-schema validation (for example when imported into the authoring tool). The bug is present on master (6.20.1).
Your environment
- Framework 5.56.2, adapt-contrib-hotgraphic 6.20.1 (also present on
master)
- N/A (build-time migration, not browser)
Steps to reproduce
- Take a hotgraphic course authored before v6.13.1 (no
_tooltip._position on items).
- Migrate it up through v6.13.1 (e.g.
grunt migration:test --file=adapt-contrib-hotgraphic, or import into the authoring tool).
- Validate the migrated content against the current component schema.
Expected behaviour
After migration, each item's _tooltip._position should hold the schema default "bottom" (a valid enum value), so the content validates.
Actual behaviour
The v6.12.1 > v6.13.1 migration sets _tooltip._position to ''. _position was introduced in v6.13.1 already carrying an enum and a "bottom" default; '' is not a permitted value, so validation fails, e.g.:
/_items/0/_tooltip/_position must be equal to one of the allowed values
The migration's own checkContent passes only because it asserts the same invalid ''.
Suggested Fix (if known)
In migrations/v6.js, set _tooltip._position to the schema default 'bottom' in both the mutateContent ("add item _tooltip._position attribute") and the matching checkContent.
Posted via collaboration with Claude Code
Subject of the issue
The
_tooltip._positionmigration writes an empty string'', which is not a valid value for the_positionenum in the schema. Any course migrated through this step then fails modern-schema validation (for example when imported into the authoring tool). The bug is present onmaster(6.20.1).Your environment
master)Steps to reproduce
_tooltip._positionon items).grunt migration:test --file=adapt-contrib-hotgraphic, or import into the authoring tool).Expected behaviour
After migration, each item's
_tooltip._positionshould hold the schema default"bottom"(a valid enum value), so the content validates.Actual behaviour
The
v6.12.1 > v6.13.1migration sets_tooltip._positionto''._positionwas introduced in v6.13.1 already carrying anenumand a"bottom"default;''is not a permitted value, so validation fails, e.g.:The migration's own
checkContentpasses only because it asserts the same invalid''.Suggested Fix (if known)
In
migrations/v6.js, set_tooltip._positionto the schema default'bottom'in both themutateContent("add item_tooltip._positionattribute") and the matchingcheckContent.Posted via collaboration with Claude Code