Posting from shared drafts doesn’t respect wiki, mailing list mode

AI-generated summary

Users report that posting from Shared Drafts doesn’t respect wiki settings or trigger mailing list mode emails, which appears to be a bug. tomtjes initially flagged the issue, noting that topics posted from Shared Drafts to wiki-enabled categories aren’t created as wikis, and no mailing list emails are sent. They later confirmed similar behavior with timed topic publication: initial posting to a private category triggers mailing list emails, but auto-publishing to a public category does not — nor are “watching first post” emails sent tomtjes. Stephen and tomtjes agree it’s likely a bug, leading to recategorization. codinghorror suggests assigning it to @eviltrout, who then delegates to riking. riking proposes a fix: instead of reusing the same topic ID when publishing, create a new topic with identical content to avoid logic inconsistencies in lib/{post,topic}_creator. eviltrout agrees that re-creating the topic is acceptable, provided the old topic is deleted and a permalink redirect is set up to preserve links. The core issue revolves around inconsistent behavior between draft/timed publishing and standard topic creation, particularly regarding wiki status and notification systems.

I don’t know if this is intentional, but to me it feels counter-intuitive: When I’m posting a topic from shared drafts to a category that has Make new topics wikis by default enabled, it does not get posted as a wiki.

Edit: Also, no emails are sent to mailing list mode users when posting from shared drafts.

2 Likes

This is either a Contribute > Bug, or a Contribute > Feature request. I think it’s a bug, but I’ll resist the urge to recategorize.

1 Like

I think it’s a bug as well but needed a second opinion. Recategorized.

2 Likes

I now tried timed topic publication and the result is the same, if not worse.

When I initially post the topic to a private category, mailing list mode gets triggered (for the users that have access to the category), which is expected. When the topic gets auto-published later to a public category, no mailing list emails are sent, though. Also, no watching first post emails get sent either - and I think that’s different from publishing from Shared Drafts.

I haven’t tested posting a timed topic to a wiki category.

We should probably assign this one too @eviltrout

3 Likes

@riking can you take this one?

1 Like

Reviewing the code for this, I think the cleanest solution would be if we could have the publishing create a new topic w/ same content instead of trying to reuse the same topic ID. There’s a lot of logic in lib/{post,topic}_creator and keeping all that logic in sync seems doomed to fail.

Is there any requirement currently to keep the same topic ID on publishing?

It was nice to keep the ID the same, but if you think it would be cleaner to re-create the topic we can do that. We must remember to remove the old topic though, and it would be great if a permalink could be set up to redirect any links to the old topic to the new one.

3 Likes