WordPress / WordPress/wordpress-importer

Photo id references for galleries not rewritten

Open
#35 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Type] Bug
Dominant language
PHP
Stars
89
Forks
96
Avg merge
1h 13m
Merged PRs (30d)
2

Description

When importing posts with galleries, the references to attachments aren't rewritten, sometimes resulting in the galleries containing the incorrect images. This likely isn't as much a problem when importing into a Wordpress instance - which is probably the more common case. The work I was doing required importing from multiple WXR files, with conflicting ids.

Featured images are already re-mapped so the data tracking is already done. The difference is that fixing this is not just fixing meta data, but modifying the content of posts.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the existing featured-image remapping and the handling of gallery attachment references during WXR import. Reproduce the issue with multiple WXR files containing conflicting attachment IDs, then verify that imported post galleries reference the correct images rather than only the featured image metadata.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
backend, content
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.