Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the multiple creation of subtitle files #6475

Open
wants to merge 1 commit into
base: r/17.x
Choose a base branch
from

Conversation

marwyg
Copy link
Member

@marwyg marwyg commented Feb 6, 2025

Fixes opencast/opencast-editor#1550

Fixes a Bug, where multiple subtitle files get created.

How to reproduce

  • Activate the subitle editor in the editor-settings.toml
  • Create a subtitle file by clicking on +
  • Click on the "Finish" tab and click "Save"
  • Click on the "Finish" tab and click "Save"
  • Click on the "Finish" tab and click "Save"
  • Click on the "Finish" tab and click "Save"
  • Click on the "Finish" tab and click "Save"
  • ...
  • Reload with F5
  • You have created multiple Subtitle Files

How to test this patch

  • Do the steps described above
  • There should be only 1 subtitle File at the end
  • To be sure, test also the following things:
    • Test the editing of subtitle files
    • Test the deletion of subtitle files
    • ... Upload
    • ... Download
    • ... the creation of multiple files (different Languages)

Fixes the creation of multiple subtitle files, when someone clicks on "save" or "save and process" multiple times without reloading or restarting the editor.

The fix changes the initial uuid of the subtitle file. Instead of creating always a new and random one in the backend, we use the uuid provided by the frontend. So when clicking "save" multiple times, the backend code notices it's the same uuid and will not create new files every time.
@geichelberger
Copy link
Contributor

This is a frontend issue that needs to be addressed: the subtitles should have their state reset to prevent resubmission. Additionally, for new subtitles, the editor should refrain from assigning an ID, as we shouldn't depend on user input to determine our entity IDs.

@geichelberger
Copy link
Contributor

We discussed this in the dev meeting and concluded that the IDs should be created from the backend.

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