Scheduled publishing renders topic unusable

AI-generated summary

A bug has been reported in Discourse, specifically with scheduled publishing. RGJ describes a scenario where a topic is unlisted, scheduled to publish to a category in the future, and viewed by users without access to that category. This causes the topic to crash and continuously reload.

SaraDev confirms the bug, outlining the same reproduction steps and expected behavior. They suggest that the topic should either be displayed as a typical unlisted topic or show a permission error message.

A fix for this bug is expected, as tgxworld points to a GitHub pull request (#16385) that addresses the issue.

Not a very common thing, full of rare edge conditions, but the least I could do is file a bug report.

Repro on tests-passed

  • Create a topic
  • Unlist it
  • Set topic timer to schedule publishing to a category somewhere in the future.

When other users are viewing that topic - before it is actually published - and they do not have access to the future category, the code that says “This topic will be published to #category in x days.” will crash (because it cannot access the slug of the future category) and cause eternal reloading of the page.

Yes, it’s a very rare thing to publish a topic to a more restricted category while users do have access to the unlisted topic.

firefox_lleHx4rv9A

10 Likes

Thanks for posting this Richard. We are flexing Discourse as a hybrid forum + LMS (Learning Management System) and this type of edge case comes up.

5 Likes

I wanted to confirm I’m seeing this behavior as well.

Followed the reproduction steps as described, and then viewed the topic as a user who didn’t have permission to access the category that the topic was set to publish to.

The title of the topic gets displayed over and over again every few seconds until the page is closed.

Without the timer set to publish the topic to a category that the user doesn’t have access to, the topic is displayed as normal (still unlisted).

Discourse Version 2.9.0.beta3

I would expect in this situation that the topic would either be displayed as a typical unlisted topic in the original category that the topic was created in (until the topic is scheduled to publish), or that there would be a message stating that the user doesn’t have permission to access that category of topic.

Certainly a rare edge case, but nonetheless hopefully this information helps resolve this bug.

4 Likes

This will be fixed in

3 Likes

This topic was automatically closed after 11 days. New replies are no longer allowed.