Make WordPress Core

Opened 7 weeks ago

Last modified 7 weeks ago

#64724 new defect (bug)

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

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

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 7 weeks ago.
Sample XML file with Notes

Download all attachments as: .zip

Change History (3)

@tenacityio
7 weeks ago

Sample XML file with Notes

#1 @westonruter
7 weeks ago

  • Milestone changed from Awaiting Review to 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
7 weeks 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.