Closed snarfed closed 6 years ago
(@jackysee mentioned the same thing in https://github.com/snarfed/bridgy/issues/527#issuecomment-346642904)
One of the hint is that the post is shown as 'uncategorized', while the post actually is categorized as 'weblinks'. So it may be that bridgy is somehow reading a work-in-progress post?
Following the lead on the 'uncategorized', I found that when my save the post through the rest api, with status='publish'
directly, the post at the moment of save_post
hook doesn't have category (hence uncategorized) or post format, which I used in theme to render the p-bridgy-twitter-content
. Therefore, at the moment when bridgy send webmention, the p-bridgy-twitter-content
is not there, and thus use the content body directly as the tweet content.
However, even though the post is not saved completely at that moment, it is afterwards, with correct category and post format, so subsequent manual ping using bridgy itself has no problem.
A way to work around it is to send two rest requests instead, one save as draft, and then one save as publish.
So this case only happen when using the rest api and publish immediately, while I don't know if it's a bug for wordpress or something I missed about the rest api.
I used to solve this by having the publish action occur a few seconds later. But it was suggested I remove this so it would happen immediately.
Since I am planning on deprecating the plugin, marking these closed.
(moved here from https://github.com/snarfed/bridgy/issues/527#issuecomment-346536517)
@jackysee:
@dshanske:
true! in the preview...but not in the publish. the post currently at https://jacky.seezone.net/2017/11/23/9304/ has
p-bridgy-twitter-content
, and the preview log does show it in parsed mf2...but the publish log (4m earlier) does not, which implies that it wasn't there when the publish happened.looks like the publish happened immediately, via webmention. maybe
p-bridgy-twitter-content
gets added later, async, and the publish webmention beat it? or maybe the publish saw an earlier cached version?