Skip to content

fix: pasting a component with image isn't working#8

Merged
Faraz32123 merged 1 commit intorelease-ulmofrom
fix/copy_paste_component_with_image_in_edx
Oct 23, 2025
Merged

fix: pasting a component with image isn't working#8
Faraz32123 merged 1 commit intorelease-ulmofrom
fix/copy_paste_component_with_image_in_edx

Conversation

@Faraz32123
Copy link

@Faraz32123 Faraz32123 commented Oct 23, 2025

Ticket: TNL2-394
When copying a component that has image in it, and we try to paste it. Image URL appends static_None. Result in crash or image not found error.

  • In this commit we have fixed this scenario, copy paste is working for components containing images.
  • Previous Code link, that caused the issue.
  • upstream PR Link.

Before:

mfe.before.mov

before.mov

After:

mfe.after.mov

after.mov

- when copying a component that has image in it, and we try to paste it. Image URL appends `static_None`. Result in crash or image not found error.
  - In this commit we have fixed this scenario, copy paste is working for components containing images.
Copilot AI review requested due to automatic review settings October 23, 2025 09:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug where pasting a component containing an image results in image URLs being corrupted with static_None, causing crashes or image not found errors. The fix prevents unnecessary URL substitutions when the file already exists with matching content.

Key Changes:

  • Modified the return value when an existing file with matching content is detected to avoid incorrect path substitutions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Faraz32123 Faraz32123 merged commit 31c19fd into release-ulmo Oct 23, 2025
48 checks passed
@Faraz32123 Faraz32123 deleted the fix/copy_paste_component_with_image_in_edx branch October 23, 2025 10:42
timmc-edx pushed a commit that referenced this pull request Oct 24, 2025
…_edx

fix: pasting a component with image isn't working
@timmc-edx
Copy link
Member

timmc-edx commented Oct 24, 2025

Historical note: We rewrote release-ulmo, and the merge commit for this PR was rewritten to ec3639e

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.

3 participants