• Resolved silvermoon82

    (@silvermoon82)


    I replied to another thread, but I have more information now so started a new post; this might be a different issue.

    Your author URL https://roosenmaallen.com/author/admin/ does not return valid JSON for application/activity+json. Please check if your hosting supports alternate Accept headers.

    As well, I can no longer search for my blog user in Mastodon; on my main instance I already follow my blog, but on my alt account I get no response searching for @admin@roosenmaallen.com. If I force the issue by eg. navigating to https://tech.lgbt/authorize_interaction?uri=@admin@roosenmaallen.com, the error is “Unfortunately, there was an error looking up the remote account”

    The webfinger endpoint gives the expected response:

    erose@lorge:~$ curl -i -H "Accept: application/activity+json" https://roosenmaallen.com/.well-known/webfinger?resource=acct:admin@roosenmaallen.com
    HTTP/2 200 
    content-type: application/json; charset=UTF-8
    date: Sat, 28 May 2022 19:05:29 GMT
    server: Apache
    x-powered-by: PHP/7.4.29
    x-robots-tag: noindex
    link: <https://roosenmaallen.com/wp-json/>; rel="https://api.w.org/"
    x-content-type-options: nosniff
    access-control-expose-headers: X-WP-Total, X-WP-TotalPages, Link
    access-control-allow-headers: Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
    allow: GET
    vary: Origin
    
    {"subject":"acct:admin@roosenmaallen.com","aliases":["https:\/\/roosenmaallen.com\/author\/admin\/"],"links":[{"rel":"self","type":"application\/activity+json","href":"https:\/\/roosenmaallen.com\/author\/admin\/"},{"rel":"http:\/\/webfinger.net\/rel\/profile-page","type":"text\/html","href":"https:\/\/roosenmaallen.com\/author\/admin\/"}]}

    The rel-self link matches the Site Health error, and that URL returns an empty body, but with an interesting Link header:

    erose@lorge:~$ curl -i -H "Accept: application/activity+json" https://roosenmaallen.com/author/admin/
    HTTP/2 200 
    content-type: application/activity+json
    date: Sat, 28 May 2022 19:09:36 GMT
    server: Apache
    x-powered-by: PHP/7.4.29
    link: <https://roosenmaallen.com/wp-json/>; rel="https://api.w.org/", <https://roosenmaallen.com/wp-json/wp/v2/users/1>; rel="alternate"; type="application/json"
    
    erose@lorge:~$

    That rel-alternate link does give the expected json:

    erose@lorge:~$ curl -i -H "Accept: application/activity+json"  https://roosenmaallen.com/wp-json/wp/v2/users/1
    HTTP/2 200 
    content-type: application/json; charset=UTF-8
    date: Sat, 28 May 2022 19:10:45 GMT
    server: Apache
    x-powered-by: PHP/7.4.29
    x-robots-tag: noindex
    link: <https://roosenmaallen.com/wp-json/>; rel="https://api.w.org/"
    x-content-type-options: nosniff
    access-control-expose-headers: X-WP-Total, X-WP-TotalPages, Link
    access-control-allow-headers: Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
    allow: GET
    vary: Origin
    
    {"id":1,"name":"Eddie Roosenmaallen","url":"https:\/\/roosenmaallen.com","description":"By day I'm the Release Manager at Distributive (n\u00e9e Kings Distributed Systems); I help build the Distributed Compute Protocol at https:\/\/dcp.cloud.\r\n\r\nIn my off time I explore Linux, JavaScript and the web, and I try to share some of my knowledge and some of my humour online.","link":"https:\/\/roosenmaallen.com\/author\/admin\/","slug":"admin","avatar_urls":{"24":"https:\/\/secure.gravatar.com\/avatar\/49a1e3267d027cd4c0c463d8b042db06?s=24&d=wavatar&r=r","48":"https:\/\/secure.gravatar.com\/avatar\/49a1e3267d027cd4c0c463d8b042db06?s=48&d=wavatar&r=r","96":"https:\/\/secure.gravatar.com\/avatar\/49a1e3267d027cd4c0c463d8b042db06?s=96&d=wavatar&r=r"},"meta":[],"_links":{"self":[{"href":"https:\/\/roosenmaallen.com\/wp-json\/wp\/v2\/users\/1"}],"collection":[{"href":"https:\/\/roosenmaallen.com\/wp-json\/wp\/v2\/users"}]}}erose@lorge:~$

    So I suspect one of two things:
    1. A recent update to the ActivityPub plug-in broke the main author page’s json, but not the rel-alternate endpoint
    2. Mastodon used to follow the Link header, but a recent update broke that

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Matthias Pfefferle

    (@pfefferle)

    Hey @silvermoon82

    First to 2.: The link header is not added by the AP plugin and does not return the correct data. The header is set by WordPress and points to the WordPress API endpoint for the admin user. It is also JSON, but the format is not ActivityStreams 2.0 compatible.

    To 1.: Have you tried to endable WP_DEBUG, to check if there are some fatal errors, and/or can you check if you have caching enabled?

    Thread Starter silvermoon82

    (@silvermoon82)

    Okay, I tried a fetch with WP_DEBUG enabled. Initially there was a warning from the Block Biggbar plugin, but when I disable that and the warning goes away the endpoint still returns an empty body.

    Caching! You nailed it! I was using the “Jetpack Boost” plugin; when I disabled that the JSON body came back.

    Plugin Author Matthias Pfefferle

    (@pfefferle)

    @silvermoon82 this is good news 🙂

    Is there a way to add URLs that should not be cached?

    tcavalcanti

    (@tcavalcanti)

    Thanks, I just had this problem too.

    It’s interesting to observe that I activated ActivityPub, and LATER installed and activated the JetPack Boost plugin; everything was FINE, until I updated the Boost plugin today. Only then the error started showing in WP.

    (no, in the plugin settings there is no way to add URL exceptions for not being cached)

    Saludos

    I was having the same problem and narrowed it down to the “Defer Non-Essential JavaScript” switch in Jetpack Boost. Leave it switched off and you get the JSON body; turn it on and you get nothing but HTTP headers.

    Plugin Author Matthias Pfefferle

    (@pfefferle)

    Has someone already filed an issue for that on the jetpack side?

    No, I only just discovered it an hour ago. I can do it this weekend.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Author page json not in expected place’ is closed to new replies.