Title: Fatal error while commenting a post
Last modified: September 22, 2023

---

# Fatal error while commenting a post

 *  Resolved [Elena Brescacin](https://wordpress.org/support/users/talksina/)
 * (@talksina)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/fatal-error-while-commenting-a-post/)
 * Hello, a problem occurs when Friends plugin is active on my blog.
 * When I post a comment, it returns a fatal error but the comment gets posted anyways;
   it happens with my own admin logged in session only, while it all goes smooth
   if I comment anonymously -not logged in- or another WordPress user/follower does,
   they get no issue (otherwise they would have told me).
 * Noticed it was Friends, because deactivating it, the error disappears.
 * Here’s the error:
 * > Fatal error: Uncaught TypeError: Argument 1 passed to Activitypub\Transformer\
   > Post::transform() must be an instance of WP_Post, string given, called in /
   > home/customer/www/plusbrothers.net/public_html/wp-content/plugins/activitypub/
   > includes/model/class-post.php on line 37 and defined in /home/customer/www/
   > plusbrothers.net/public_html/wp-content/plugins/activitypub/includes/transformer/
   > class-post.php:93 Stack trace: #0 /home/customer/www/plusbrothers.net/public_html/
   > wp-content/plugins/activitypub/includes/model/class-post.php(37): Activitypub\
   > Transformer\Post::transform(‘27281’) #1 /home/customer/www/plusbrothers.net/
   > public_html/wp-content/plugins/friends/feed-parsers/activitypub/class-comment.
   > php(107): Activitypub\Model\Post->__construct(‘27281’) #2 /home/customer/www/
   > plusbrothers.net/public_html/wp-content/plugins/friends/feed-parsers/class-
   > feed-parser-activitypub.php(1690): Activitypub\Model\Comment->__construct(555)#
   > 3 /home/customer/www/plusbrothers.net/public_html/wp-includes/class-wp-hook.
   > php(310): Friends\Feed_Parse in /home/customer/www/plusbrothers.net/public_html/
   > wp-content/plugins/activitypub/includes/transformer/class-post.php on line 
   > 93
 * WordPress 6.3.1, ActivityPub 1.0.0, latest “Friends” plugin stable version, hosting
   SiteGround.
 * What’s wrong? Thanks
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffatal-error-while-commenting-a-post%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Alex Kirk](https://wordpress.org/support/users/akirk/)
 * (@akirk)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/fatal-error-while-commenting-a-post/#post-17071670)
 * Sorry about this! Tracking the error in [https://github.com/akirk/friends/issues/254](https://github.com/akirk/friends/issues/254)
 * The reason is that the ActivityPub refactored some things and I missed this one,
   [I had fixed another one in time](https://github.com/akirk/friends/pull/241).
 * I hope to provide a fix and a new version soon!
 *  Plugin Author [Alex Kirk](https://wordpress.org/support/users/akirk/)
 * (@akirk)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/fatal-error-while-commenting-a-post/#post-17073221)
 * I released version [2.7.7](https://github.com/akirk/friends/releases/tag/2.7.7)
   which should fix this error. Sorry for the trouble!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Fatal error while commenting a post’ is closed to new replies.

 * ![](https://ps.w.org/friends/assets/icon-256x256.png?rev=3496634)
 * [Friends](https://wordpress.org/plugins/friends/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/friends/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/friends/)
 * [Active Topics](https://wordpress.org/support/plugin/friends/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/friends/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/friends/reviews/)

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [Comments](https://wordpress.org/support/topic-tag/comments/)
 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 2 replies
 * 2 participants
 * Last reply from: [Alex Kirk](https://wordpress.org/support/users/akirk/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/fatal-error-while-commenting-a-post/#post-17073221)
 * Status: resolved