wordpress-activitypub: Conflict with XRay's parsing of microformats
Not sure if this should be logged here or with XRay - but when ActivityPub plugin is enabled, XRay detects the content-type of posts as activity+json, and then doesn’t parse the microformats in the post correctly.
e.g. this post - https://doubleloop.net/2020/01/03/6502/
with AP plugin disabled:
{
"data": {
"type": "entry",
"published": "2020-01-03T21:02:30+00:00",
"like-of": [
"https://calumryan.com/blog/my-2010s/"
],
"author": {
"type": "card",
"name": "Neil Mather",
"url": "https://doubleloop.net/",
"photo": "https://secure.gravatar.com/avatar/525ddf1ae0f87a3bc6ddf8be6cc4b50c?s=100&d=default&r=g"
},
"post-type": "like",
"refs": {
"https://calumryan.com/blog/my-2010s/": {
"type": "entry",
"url": "https://calumryan.com/blog/my-2010s/",
"name": "My 2010s",
"author": {
"type": "card",
"name": "Calum Ryan",
"url": false,
"photo": null
},
"post-type": "article"
}
},
"rels": {
"canonical": "https://doubleloop.net/2020/01/03/6502/"
}
},
"url": "https://doubleloop.net/2020/01/03/6502/",
"code": 200,
"source-format": "mf2+html"
}
with AP plugin enabled:
{
"data": {
"type": "entry",
"url": "https://doubleloop.net/2020/01/03/6502/",
"published": "2020-01-03T21:02:30+00:00",
"summary": "",
"content": {
"text": "Liked My 2010s by Calum Ryan (Calum Ryan)\nA decade-end review of my life to date seems almost too much to achieve in a digestible short read but here we go!https://doubleloop.net/2020/01/03/6502/",
"html": "Liked <a href=\"https://calumryan.com/blog/my-2010s/\" class=\"p-name u-url\">My 2010s</a> by Calum Ryan (Calum Ryan)\n<blockquote class=\"e-summary\"><p>A decade-end review of my life to date seems almost too much to achieve in a digestible short read but here we go!</p></blockquote><p><a href=\"https://doubleloop.net/2020/01/03/6502/\">https://doubleloop.net/2020/01/03/6502/</a></p>"
},
"author": {
"type": "card",
"name": "Neil Mather",
"url": "https://doubleloop.net/author/neil/",
"photo": "https://doubleloop.net/wp-content/uploads/avatar-privacy/cache/user/8/5/8538d26ce878a6e2589b56516ab6d5333283f785d1b85009044b8aa617b81fba-120.png",
"nickname": "neil"
},
"post-type": "note"
},
"url": "https://doubleloop.net/2020/01/03/6502/",
"code": 200,
"source-format": "activity+json"
}
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (5 by maintainers)
I see the problem…the accept header has multiple values. This plugin isn’t following precedence
@bekopharm @ngm https://gist.github.com/dshanske/e2659241f1c8c064441737afbd89654c Try adding this gist somewhere, such as in a plugin or otherwise in the interim. Should work for your use case.
Thanks @pfefferle and @dshanske
Just for some extra info - the reason I noticed this was because https://2020.indieweb.org/london wasn’t processing my RSVP. I’m guessing that it probably uses the XRay library 😃
Also, https://micrometa.jkphl.is/ and http://pin13.net both appeared to parse the raw microformats fine with the plugin enabled - I guess that’s perhaps because they don’t do any special handling of activity+json, whereas XRay does?