Yoast / Yoast/duplicate-post

Add Notes as an "element to copy" option

Open
#421 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
53
Forks
38
Avg merge
4d 8h
Merged PRs (30d)
1

Description

Is your feature request related to a problem? Please describe.

WordPress 6.9 introduces a new feature, Notes, which allows users to leave block-level comments when editing content.

Under the hood, notes are just WP_Comments with the comment_type of note. The post association is made through the comment_post_ID field in each WP_Comment object/database, and a note is associated with a block through block-level metadata.

<!-- wp:paragraph {"metadata":{"noteId":3}} -->
<p>This is some text about the walk I took at the reservoir. </p>
<!-- /wp:paragraph -->

Note (pun intended): After cloning a post, the notes are not shown because of the comment_post_ID pointing to the old one, even though the block-level metadata remains. I've opened #420 for this "bug".

In some cases the user may want the conversations that happened within Notes to also be copied so that they can continue separate from the original post.

Describe the solution you'd like

On the Settings page, there should be an option to also include Notes. There is currently an option to include Comments, but this does not copy Notes because they are explicitly excluded from all areas of Core unless comment_type is explicitly set to all or note.

Image

Why do you think this feature is something we should consider for the Yoast SEO plugins?

This plugin is specifically for cloning posts.

Additional context

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 at the Settings page and trace the existing option to include Comments, then follow the post-cloning path that handles comment types and block metadata. Done means users can opt to copy Notes with a cloned post while keeping the copied conversations associated with the new post rather than the original.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.