Publishing content re-publishes ALL segment variations (including e.g. stopped A/B test variants) #22198
cornehoskam
started this conversation in
Features and ideas
Replies: 1 comment
-
|
I'll move this to a discussion @cornehoskam as I don't think this is really a bug, and what you see is currently as expected. Rather its a long standing limitation of segment variants that they don't participate in publishing and unpublishing (like language variants do). I would imagine it's quite a big job to support this - but that doesn't mean to say we shouldn't of course discuss it when we can get the brains together and see what could be done. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Which Umbraco version are you using?
17.2.2
Bug summary
When a content node is published (Save and Publish),
Property.PublishValues(culture)is called with the defaultsegment = "*", which copies all segment variations from draft to published — including segments that belong to stopped or completed A/B tests.This means there is no way for packages (like Umbraco Engage) to "unpublish" a single segment variation on a content node while keeping its draft data for backoffice review. Any segment data that exists in the draft will be re-promoted to the published version on the next publish, even if it was intentionally removed from the published version.
Specifics
See Bug Summary.
There is no mechanism to exclude specific segments from being published, nor a way to mark a segment as "unpublished" so that it survives a subsequent publish operation.
Steps to reproduce
engage_variant_1) — this can be done programmatically viaIContentService.Save()or through Umbraco Engage's A/B testing feature.umbracoPropertyDatarows whereversionId = publishedVersionIdandsegment = 'engage_variant_1'). Refresh the content cache.PublishValues(culture)re-copied it from the draft.Expected result / actual result
Expected: Publishing a content node should not re-publish segment variations that were intentionally removed from the published version. Ideally, there should be a way to "publish" and "unpublish" a specific segment (similar to how individual cultures can be unpublished), or at minimum a hook/notification that allows packages to prevent specific segments from being published.
Actual: Every
Save and Publishoperation promotes ALL draft segment data to the published version unconditionally, becausePublishValuesdefaults tosegment = "*". There is no way to exclude specific segments, and no event/notification to intercept and prevent this. This makes it impossible for packages to manage the publish state of individual segments.Beta Was this translation helpful? Give feedback.
All reactions