-
Notifications
You must be signed in to change notification settings - Fork 0
URL rewriting in migrated content #192
Copy link
Copy link
Closed
Labels
area:migrationWordPress importer + compatWordPress importer + compatphase:P5-migrationPhase 5 — MigrationPhase 5 — Migrationpriority:P1Important — should land in phaseImportant — should land in phaseskill:goGo programmingGo programmingtype:featNew feature or implementation taskNew feature or implementation task
Milestone
Metadata
Metadata
Assignees
Labels
area:migrationWordPress importer + compatWordPress importer + compatphase:P5-migrationPhase 5 — MigrationPhase 5 — Migrationpriority:P1Important — should land in phaseImportant — should land in phaseskill:goGo programmingGo programmingtype:featNew feature or implementation taskNew feature or implementation task
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
URL rewriting in converted content per doc 08 §5 stage 5 and §6.2. Any
url/srcattribute pointing at the old site'swp-content/uploads/...is resolved through the attachment-map: strip?ver=query string, look up source path, replace with new URL. Handles WP's per-size suffixes (image-1024x768.jpg) by stripping the suffix and resolving the base. Unresolvable URLs emitmedia_url_unresolvedwarning and the original URL is left untouched (will 404 visibly, with a logged warning).Design reference
Acceptance criteria
rewriteMediaURLs(tree, attachmentMap)walks the block treesrc/url/hrefattrs incore/image,core/gallery,core/cover,core/audio,core/video,core/file?ver=and other query params before lookup-NNNxNNN,-scaled) by stripping → resolving basemedia_url_unresolvedwarning emitted for unresolved URLsDependencies
#html-to-blocks, #media-migration
Complexity
M