Closed YiffyToys closed 1 year ago
Can you tell me your blog URL and the Username, so that I can have a look?
@suran@blog.yiffytoys.de
I have moved to a regular Mastodon server and another WP plugin.
Also experiencing this issue, same symptoms and same stacktrace. I added a debug line in line 75 of includes/class-signature.php
: error_log(print_r($url, true));
to find out what the WP_Error
object being passed to wp_parse_url
was.
Result:
WP_Error Object
(
[errors] => Array
(
[activitypub_no_valid_actor_url] => Array
(
[0] => The "actor" is no valid URL
)
)
[error_data] => Array
(
[activitypub_no_valid_actor_url] => https://social.vivaldi.net/users/example
)
[additional_data:protected] => Array
(
)
)
It seems like \wp_http_validate_url( $actor )
called on line 122 of includes/functions.php
considers the $actor
URL to be invalid, though it's not immediately obvious why that would be. And of course the WP_Error
generated on line 123 is then not being handled gracefully.
Debugging further, it appears to fail the http_request_host_is_external
check in \wp_http_validate_url
.
And the reason that http_request_host_is_external
check was being run at all was because the author URL's hostname was resolving to a local network IP. Hopefully this information might be helpful to anyone else encountering this.
FYI: Wich is perfectly fine if it's hosted on the same machine. Names don't have to resolve to the same collection of IPV6 addresses from everywhere.
This seems to be the fix: In Activitypub\Rest\handle_follow
…
On line 330…
Here's the $object via print_r debugging…
Array
(
[user_id] => 2
[@context] => https://www.w3.org/ns/activitystreams
[id] => https://c.im/41d40d8f-29dd-404f-913a-15ae38a33266
[type] => Follow
[actor] => https://c.im/users/craigconstantine
[object] => https://constantine.name/author/craig/
)
So actor $object['actor']
is trying to act on inbox $object['object']
… the argument should be $object['object']
I've modified my local code. Issued a fresh follow request from a remote mastodon instance, and I did not get a 500-apache-error, … lots of debugging output, but I have a follower listed in WP.
Putting up a quick test post on WP… my debug log is full of deprecated errors (I'll start another issue for that). BUT it seems that the ActivityPub plugin realized it should notify the remote mastodon. So it looks like a successful follow.
upon further consideration… I'm misunderstanding what was going on in Activitypub\Rest\handle_follow()
. My suggested change is wrong. I'll undo my local change and dig into it again…
The latest plugin release has resolved my issue. 🤟
Follow requests from another Mastodon server succeed instantly. New posts in my WP server appear as expected over on that Mastodon instance.
THANK YOU! 😃
I will close the issue for now, please re-open if still a problem!
Version: 0.13.4 Wordpress 6.1.1 PHP 7.4-fpm Apache
I am experiencing the "waiting for approval" issue mentioned in https://wordpress.org/support/topic/approve-follow-request-redux/