[wp-trac] [WordPress Trac] #63240: footnotes problem
WordPress Trac
noreply at wordpress.org
Sat Apr 5 15:50:11 UTC 2025
#63240: footnotes problem
--------------------------+------------------------------
Reporter: kamago | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Database | Version: 6.7.2
Severity: major | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by kamago):
After further investigation, it appears that the issue is linked to how
the footnotes post meta is handled in relation to post revisions.
As defined in `wp-includes/blocks/footnotes.php`, the `footnotes` field is
registered with the `revisions_enabled => true` flag:
{{{
register_post_meta(
$post_type,
'footnotes',
array(
'show_in_rest' => true,
'single' => true,
'type' => 'string',
'revisions_enabled' => true,
)
);
}}}
So every time a post is saved, a new row is inserted in `postmeta` with a
`post_id` **pointing to the revision, not the main post**.
**Suggestion** :
- on post update, automatically copy the latest `footnotes` meta from the
latest revision to the main post
- OR, the editor should fetch `footnotes` from the latest revision instead
of the main post
At least until proper revision handling is implemented, consider setting
`'revisions_enabled'=>false` to avoid this entire issue
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63240#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list