Topic published on 'Invalid date' with ActivityPub

https://meta.discourse.org/t/topics-made-with-activitypub-dont-have-a-category/360221/1

In that topic, the topic says 'Topic was published via ActivityPub on Invalid date'.

See this screenshot:



Discuss this on our forum.
1 Like

Thanks for the report, appreciate it. I see the same, we will look into it.



Discuss this on our forum.
1 Like

@pmusaraj Could you share any relevant meta logs from Apr 3, 2:42 PM, when that post was posted? It might help determine why the post-publication behaviour, i.e. saving published at, isn't working in some cases.



Discuss this on our forum.
1 Like

Oh, I added a partial fix for this in https://github.com/discourse/discourse-activity-pub/pull/243, I think. If you rebuild your instance @adulau you should no longer see this issue.

The underlying bug isn’t fixed. In some cases, the plugin creates multiple activity_pub_published_at custom fields for the same object, which results in the serializer returning an array of dates for topic.activity_pub_published_at. Often these are the same date added twice in the array. The frontend code (Moment) doesn’t know how to interpret an array of dates and outputs invalid date. The fix above ensures the serializer always outputs a single date (without yet fixing the underlying reason for multiple custom fields).



Discuss this on our forum.
3 Likes

FYI I reported this as well some time ago in the SocialHub forum. Cross-referencing to Topic was published via ActivityPub on Invalid date

2 Likes

Thanks for the fix. It indeed works now. By the way, the ActivityPub plugin is really awesome.



Discuss this on our forum.
2 Likes