Closed kariae closed 9 months ago
This PR fixes broken URLs migrated in content and migrates text styling.
Search in the database posts you migrated with broken migrated URLs post_content like '%>http<%'.
post_content like '%>http<%'
Check the post frontend and notice that the article contains some URLs with http as text.
http
Get the post-original ID from the database using the meta _newspack_import_id.
_newspack_import_id
Add a condition around line 547 to migrate only that post (only for test purposes), something like:
if ('123456' !== $post['story_id'] ) { continue; }
Run the migrator with the flags --refresh-content --skip-post-media to refresh the content without downloading the images.
--refresh-content --skip-post-media
Recheck the post and notice that the URLs are fixed.
Do the same for the text styling tags:
post_content like '%==I%'
post_content like '%==B%'
post_content like '%==BI%'
[x] confirmed that PHPCS has been run
This PR fixes broken URLs migrated in content and migrates text styling.
How to test
Search in the database posts you migrated with broken migrated URLs
post_content like '%>http<%'
.Check the post frontend and notice that the article contains some URLs with
http
as text.Get the post-original ID from the database using the meta
_newspack_import_id
.Add a condition around line 547 to migrate only that post (only for test purposes), something like:
Run the migrator with the flags
--refresh-content --skip-post-media
to refresh the content without downloading the images.Recheck the post and notice that the URLs are fixed.
Do the same for the text styling tags:
post_content like '%==I%'
post_content like '%==B%'
Bold & Italic:
post_content like '%==BI%'
[x] confirmed that PHPCS has been run