bug: onContentChangeState auto-post does not check for duplicate cross-posts #238
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
When articles are bulk-published via
onContentChangeState, the handler callsCrossPostDispatcher::dispatch()for each article. Whiledispatch()has a duplicate guard that checks for existingqueued/posted/postingentries, theonContentChangeStatehandler does not checkpost_on_first_publish_only.Looking more carefully, line 516 does check
auto_post_on_publishbut does NOT checkpost_on_first_publish_only-- unlikeonContentAfterSaveat line 475 which does. This means:post_on_first_publish_only)The duplicate guard in
dispatch()catchesqueued/posted/postingstatus entries, but if the previous post wasdeleted(via delete-on-unpublish) orpermanently_failed, the guard won't prevent a re-post.Fix
Add
post_on_first_publish_onlycheck inonContentChangeState:Impact
source/packages/plg_content_mokosuitecross/src/Extension/MokoSuiteCrossContent.phponContentChangeState()(line 489)Branch created:
feature/238-bug-oncontentchangestate-auto-post-does-