Changes between Version 1 and Version 2 of Ticket #59827, comment 16
- Timestamp:
- 11/09/2023 05:54:11 PM (14 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #59827, comment 16
v1 v2 3 3 > It looks like your plugin returns a string for the '_wp_post_revision_field_' . meta_key filter, so it doesn't make sense that it triggers this error 4 4 5 The " '_wp_post_revision_field_' . meta_key" filter is only used for the diff shown to users on the revision page.5 The "_wp_post_revision_field_{meta_key}" filter is only used for the diff shown to users on the revision page. 6 6 7 7 The problem is the compare done in `wp_save_post_revision()` (see https://github.com/WordPress/wordpress-develop/blob/6.3/src/wp-includes/revision.php#L109) which WordPress uses to determine if a revision needs to be saved - it assumes that all post meta are strings. 8 9 I didn't actually need to include the "_wp_post_revision_fields" and "_wp_post_revision_field_{meta_key}" filters in the test plugin to create the error - it's just nice to have some visual feedback on the revisions page. :) To trigger the bug, you just need to save the Page with the test plugin active. 8 10 9 11 > ps. it would be good to add a test here to validate any fix we come up with.