• Resolved ImageMatze Pabst

    (@matthiaspabst)


    Hi!

    I have two websites with ActivityPub and Friends plugins enabled. On both sites the ActivityPub profile type is set to “blog profile only”.

    When I try to add website 2 as a new friend in website 1 and click on “preview”, I get the following fatal error:

    Uncaught Error: Friends\Feed_Parser_ActivityPub::handle_incoming_update_person(): Argument #2 ($user_feed) must be of type Friends\User_Feed, null given, called in /var/www/vhosts/httpdocs/wp-content/plugins/friends/feed-parsers/class-feed-parser-activitypub.php on line 1042
    in /var/www/vhosts/httpdocs/wp-content/plugins/friends/feed-parsers/class-feed-parser-activitypub.php on line 1210

    Call stack:

    Friends\Feed_Parser_ActivityPub::handle_incoming_update_person()
    wp-content/plugins/friends/feed-parsers/class-feed-parser-activitypub.php:1042
    Friends\Feed_Parser_ActivityPub::process_incoming_activity()
    wp-content/plugins/friends/feed-parsers/class-feed-parser-activitypub.php:764
    Friends\Feed_Parser_ActivityPub::fetch_feed()
    wp-content/plugins/friends/includes/class-feed.php:182
    Friends\Feed::preview()
    wp-content/plugins/friends/includes/class-admin.php:2142
    Friends\Admin::render_admin_add_friend()
    wp-includes/class-wp-hook.php:324
    WP_Hook::apply_filters()
    wp-includes/class-wp-hook.php:348
    WP_Hook::do_action()
    wp-includes/plugin.php:517
    do_action()
    wp-admin/admin.php:260

    What’s the problem? How can I solve this?

    Best regards
    Matthias

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author ImageAlex Kirk

    (@akirk)

    Hi Matze, thanks for the report and sorry for the late reply! This looks like it’s a problem specific to the preview and it will work when actually following that second blog.

    The problem was that the “feed” contains an update of the profile but at the time of the preview you are not following yet so the update cannot be applied. I overlooked this aspect when implementing it.

    This will be fixed in the next version, you can view the fix https://github.com/akirk/friends/pull/547 if you’re interested.

Viewing 1 replies (of 1 total)

The topic ‘Fatal error when adding new friend’ is closed to new replies.