Skip to content

Commit

Permalink
Fix - Single Lanauge sites (with vary by culture on) report culture a…
Browse files Browse the repository at this point in the history
…s being published when it isn't - because Umbraco reports the culture as being published when it isn't
  • Loading branch information
KevinJump committed Nov 9, 2023
1 parent ea6e717 commit 4945a0e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion uSync.Core/Serialization/Serializers/ContentSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ private XElement SerailizePublishedStatus(IContent item, SyncSerializerOptions o
{
if (activeCultures.IsValid(culture))
{
published.Add(new XElement("Published", item.IsCulturePublished(culture),
// there is a "bug" in umbraco where if only one language is available
// and you unpublish it, then the language remains 'published' while
// the default is to be 'unpublished'
// so if the default is 'unpublished' we take that over a culture value
published.Add(new XElement("Published", item.Published is false ? false : item.IsCulturePublished(culture),
new XAttribute("Culture", culture)));
}
}
Expand Down

0 comments on commit 4945a0e

Please sign in to comment.