Vimeo Migration Hotfixes#1052
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes two issues with Vimeo video migration: ensuring the GoDAM Central (Virtual Media) logo appears for migrated Vimeo videos and preventing duplicate attachments when the same video is migrated multiple times.
- Refactored video metadata update logic into a reusable method to handle both new and existing attachments
- Added duplicate prevention by checking for existing attachments using job IDs before creating new ones
- Updated attachment metadata handling to save job IDs for proper tracking
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
KMchaudhary
reviewed
Sep 8, 2025
| $status = $godam_migration_status['message']['migration_status']; | ||
| if ( 'Completed' !== $status ) { | ||
| // Reset migration status since Central migration is not completed. | ||
| delete_option( $wp_option_key ); |
Collaborator
There was a problem hiding this comment.
What happens if migration is already done, and the user tries to run the migration a second time?
Collaborator
Author
There was a problem hiding this comment.
If user tries to run the migration a second time, there are two cases:
- If the migration stayed as "Completed" on Central, then this condition won't happen, the status will not be deleted.
- If the migration on central is in progress or it returns failed state or error, then this status will be deleted.
KMchaudhary
approved these changes
Sep 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
1. GoDAM Central (Virtual Media) Logo now appears for Vimeo Migrated Videos:
2. Same videos migrated from Vimeo in subsequent migrations will not create duplicate attachments in Media Library.
3. Fixed fatal error when Vimeo Migration is in progress on Central
Before:

After:
Screen.Recording.2025-09-07.at.5.18.10.PM.mov