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

Studio: make sure the search and replace database work properly in all images #764

Merged
merged 7 commits into from
Jan 3, 2025

Conversation

katinthehatsite
Copy link
Contributor

@katinthehatsite katinthehatsite commented Dec 30, 2024

Related issues

Closes https://github.com/Automattic/dotcom-forge/issues/10060

Proposed Changes

This PR runs the search and replace for images on local sites after the import is finished to ensure that the URLs are updated to the URLs of the local site.

Testing Instructions

  • Create an Atomic site on WP.com and add an image to one of the posts
  • Pull the changes from this branch
  • Start Studio with npm install && npm start
  • Navigate to the Sync tab
  • Connect the WP.com site on which you created the post with the image
  • Pull the WP.com site
  • Once the pull is finished, navigate to the local site
  • Navigate to the post with the image
  • Inspect the image source and confirm that the URL is changed to localhost

Screenshot 2024-12-30 at 12 03 33 PM

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@katinthehatsite katinthehatsite self-assigned this Dec 30, 2024
@wojtekn
Copy link
Contributor

wojtekn commented Jan 2, 2025

This PR runs the search and replace for images on local sites after the import is finished to ensure that the URLs are updated to the URLs of the local site.

Studio already runs search and replace in the trunk. Is the issue we are fixing related to running it for the SSL version and not for non-SSL or vice versa? If yes, could we clarify this in the description?

@katinthehatsite
Copy link
Contributor Author

@wojtekn I responded to feedback, feel free to give it another test 👍

Copy link
Contributor

@wojtekn wojtekn left a comment

Choose a reason for hiding this comment

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

Works as expected.

@wojtekn wojtekn merged commit e79731b into trunk Jan 3, 2025
6 checks passed
@wojtekn wojtekn deleted the fix/run-search-replace-on-media-post-import branch January 3, 2025 08:26
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