Topic published on 'Invalid date' with ActivityPub

Oh, I added a partial fix for this in DEV: Ensure activity_pub_published_at returns a single date by pmusaraj · Pull Request #243 · discourse/discourse-activity-pub · GitHub, 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).

4 Likes