Make WordPress Core

Opened 9 months ago

Last modified 9 months ago

#64724 new defect (bug)

WordPress Importer does not remap noteId in block metadata when reassigning comment IDs

Reported by: tenacityio Owned by:
Priority: normal Milestone: Future Release
Component: Import Version: 6.9.1
Severity: minor Keywords: notes import
Cc: Focuses:

Description

Steps to reproduce:

  1. Create a post/page with block notes (WP 6.9 Notes feature)
  2. Export via Tools → Export
  3. Import the WXR file into another site (or same site) via the WordPress Importer
  4. Open the imported post in the editor

Expected: Notes appear attached to their respective blocks

Actual: Notes import as comments but are unlinked from blocks. The importer assigns new comment_id values but does not update the corresponding "noteId":N values in block metadata within post_content.

Workaround: Post-import script that remaps noteId references in post_content to the new comment_id values by matching on insertion order.

Attachments (1)

notes-import-bug-test-case.xml​ (15.9 KB ) - added by tenacityio 9 months ago.
Sample XML file with Notes

Download all attachments as: .zip

Change History (3)

#1 @westonruter
9 months ago

  • Milestone Awaiting Review → Future Release

I thought this might be a problem with footnotes as well, but a footnote use a UUID as its ID, not any underlying auto-incremented ID.

#2 @hbhalodia
9 months ago

Hi @westonruter @tenacityio, I guess we need to fix it in upstream repo here ​https://github.com/WordPress/wordpress-importer/?

If Yes, I do have a PR ready for the same - ​https://github.com/WordPress/wordpress-importer/pull/254

Thanks,

Note: See TracTickets for help on using tickets.