You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Video: course-side title override of a library-synced Video is lost on sync (editor_saved doesn't call super) #326
For a Video reused from a Content Library V2 into a course, a course-side title override is overwritten by the next sync from the library. The same flow keeps the override for HTML, Word Cloud, LTI and Problem.
Steps to reproduce
Found while smoke-testing openedx/openedx-platform#38750 on a local Tutor nightly (platform master base + xblocks-core 2.0.0):
Publish a Video in a V2 library and reuse it in a course unit (Library content).
In the course, change the reused copy's display name to "Course override".
In the library, rename the video and publish.
Accept the update in the course (POST /api/contentstore/v2/downstreams/<usage>/sync).
Expected: "Course override" is kept (display_name is customizable by default). Actual: the title becomes the library's new name.
Cause
The platform mixes cms.lib.xblock.upstream_sync.UpstreamSyncMixin into every XBlock (XBLOCK_MIXINS). Its editor_saved() records customized fields in downstream_customized. xblock_video.block.VideoBlock.editor_saved() overrides it and only calls VideoConfigService.handle_editor_saved(...), never super().editor_saved(...). So for a mixed Video class, editor_saved resolves to VideoBlock.editor_saved, and the override is never recorded. For HTML it resolves to UpstreamSyncMixin.editor_saved (checked in a CMS shell).
This predates the extraction: the built-in xmodule/video_block/video_block.py::editor_saved is identical.
Suggested fix
Call super().editor_saved(user, old_metadata, old_content) from VideoBlock.editor_saved (when the parent defines it), plus a test that a customized display_name survives a sync.
Activity