Problem/Motivation

I want to be able to sync comments.

Steps to reproduce

Currently, comments are not supported.
I tried to write a plugin to import comments but when I go to /admin/content/comment and select a comment, the option to export does not appear.

I wrote the attached code, only implementing the exportBaseValues and mapBaseFieldsValues functions. Is there anything else I need to implement there?

I am attaching the code I wrote for the plugin module.

Oh, I also tried the generic entity plugin at issue 3414711. This also doesn't work (no option to export comments appears).

Proposed resolution

Help me write a plugin to support comment export / import please.

CommentFileSizeAuthor
Comment.php_.txt1.5 KBleeksoup
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

leeksoup created an issue. See original summary.

leeksoup’s picture

nginex made their first commit to this issue’s fork.

nginex’s picture

I managed to add export but still need to handle import.

The export also works for content with comments

leeksoup’s picture

@nginex - Thanks! I tried your patch and the comment exports for Forum posts look good!

For the import, what needs to be implemented? I'm willing to give it a shot if you can give me some pointers. If that would be helpful, that is. :)