Subject of the issue/enhancement/features
The adapt-youtube component ships no migration scripts at all. As a result, legacy course content whose _media._aspectRatio is stored as a string cannot be imported into the Adapt Authoring Tool, because the current component schema types that property as a number. The import aborts entirely, and the only workaround is manually editing the course JSON. Any project with a YouTube component built before the schema typed this field is affected.
Your environment
- version (AT/Framework): Adapt Authoring Tool on Framework 5.56.2 (server). Imported course built on Framework 5.40.5. adapt-youtube 3.2.0.
- which browser and its version: N/A (server-side import and content migration)
- device(s) + operating system(s): N/A (server-side import and content migration)
Steps to reproduce
- Author or obtain a course containing an
adapt-youtube component where _media._aspectRatio is a string value, for example "_aspectRatio": "1.778".
- Export the course as Framework source.
- Import the course into an Adapt Authoring Tool instance whose installed framework types
_media._aspectRatio as a number.
- Confirm the import and let the framework content migration run.
Expected behaviour
A migration script bundled with adapt-youtube should detect a string _media._aspectRatio and coerce it to a number during import, so the course imports cleanly without manual intervention. This mirrors how other plugins ship migrations/ scripts to reconcile schema changes across versions.
Actual behaviour
The import fails and rolls back with the following error:
Import of framework content failed, youtube-component: /_media/_aspectRatio must be number
Because adapt-youtube contains no migrations/ directory and no migration scripts of any kind, there is no mechanism to reconcile the legacy string value against the numeric schema. The schema change was made without a corresponding migration, so pre-existing content is left invalid with no upgrade path. The author must hand-edit the JSON (removing the quotes around the value) before the import will succeed.
Suggested Fix (if known)
Add a migrations/ directory to adapt-youtube with a migration that converts _media._aspectRatio from a string to a number on affected component instances. While doing so, audit the component's schema history for any other type or shape changes since early versions (for example nullable fields such as _progressColor) and cover them in the same migration set, so legacy courses upgrade cleanly on import.
Subject of the issue/enhancement/features
The
adapt-youtubecomponent ships no migration scripts at all. As a result, legacy course content whose_media._aspectRatiois stored as a string cannot be imported into the Adapt Authoring Tool, because the current component schema types that property as a number. The import aborts entirely, and the only workaround is manually editing the course JSON. Any project with a YouTube component built before the schema typed this field is affected.Your environment
Steps to reproduce
adapt-youtubecomponent where_media._aspectRatiois a string value, for example"_aspectRatio": "1.778"._media._aspectRatioas a number.Expected behaviour
A migration script bundled with
adapt-youtubeshould detect a string_media._aspectRatioand coerce it to a number during import, so the course imports cleanly without manual intervention. This mirrors how other plugins shipmigrations/scripts to reconcile schema changes across versions.Actual behaviour
The import fails and rolls back with the following error:
Import of framework content failed, youtube-component: /_media/_aspectRatio must be numberBecause
adapt-youtubecontains nomigrations/directory and no migration scripts of any kind, there is no mechanism to reconcile the legacy string value against the numeric schema. The schema change was made without a corresponding migration, so pre-existing content is left invalid with no upgrade path. The author must hand-edit the JSON (removing the quotes around the value) before the import will succeed.Suggested Fix (if known)
Add a
migrations/directory toadapt-youtubewith a migration that converts_media._aspectRatiofrom a string to a number on affected component instances. While doing so, audit the component's schema history for any other type or shape changes since early versions (for example nullable fields such as_progressColor) and cover them in the same migration set, so legacy courses upgrade cleanly on import.