Releases: SitecoreUnicorn/Unicorn
Support for exclude exception by template ID
There is was previous support for excluding items with a specific template ID, but not for the inverse, excluding items except those with a specific template ID. This will add support for configuration like the following:
<include name="example" database="master" path="/sitecore/content/example">
<exclude children="true">
<except templateId="{A87A00B1-E6DB-45AB-8B54-636FEC3B5523}" />
</exclude>
</include>
Thanks to @BenGGolden for this contribution.
PR here: #419
Publishing Code Updated
Removed obsolete reference to [UsedImplicitly] attribute
It was causing trouble when Unicorn was being reflection scanned by SPE/SXA when using the Site Copy functionality.
Updated to AutoPublishing code
The recent updates to Unicorn's AutoPublish functionality is apparently causing problems on some later releases of Sitecore. Look to issue #407 for an in-depth discussion. This release hopes to address everything that was discovered.
The are now only 2 forms of publishing.
-
Legacy Publishing. The tried and true way Unicorn has been publishing your synced items since the beginning of time. Use this if you're on a non-recent Sitecore release. Controlled with setting
Unicorn.LegacyPublishing
found inUnicorn.AutoPublish.config
. -
The opposite; publishing via the more recent
PublishManager
API in Sitecore. This will support Publishing Service if you have it installed.
The publishing code now also has a setting to tweak the number of items that will ever be published on a 1-by-1 basis. I recommend setting this to 0 on your local dev environments. Upstream that depends on a lot of things, use your best judgment. The setting is called Unicorn.MaxItemsToQueue
and defaults to 1000
. If number of synced items in a Sync run is X then if X <= MaxItemsToQueue, they will be processed one by one. Otherwise a database-wide Smart Publish is executed instead.
BranchID deserialization possible again
Long story short, with the release of Sitecore 10, deserializing items that did not already exist in Sitecore and were based on a Branch Template will no longer cause field values - shared field values in particular - to go missing.
The deserialization code from Sitecore 10 was retrofitted into Unicorn and Rainbow and it now works again - universally. Also for Sitecore 9 where the internal deserializer is otherwise broken.
As a result, all exception handling and configuration toggles around the handling of Branch ID have now been removed and Unicorn is back to serializing as was always the case.
Other fixes
Adjustments for Rainbow 2.1.4-pre3
Just some additional logging.
Minor adjustments for Rainbow 2.1.4-pre2
Since BranchID handling is now entirely automatic in Rainbow, default configuration no longer includes the ignoreBranchId
switch. I've left the constructor in place for compatibility reasons but the switch itself has zero effect from this point forward and will be removed entirely in a later release.
Fix for endless loop with mis-configured predicate preset instantiation
If a predicate preset included a token which was not defined in the predicate instantiation, an endless loop would be triggered when trying to resolve all tokens in the preset.
e.g.
<preset id="site" database="master">
<include name="$id.Site.$name" database="$database" path="/sitecore/content/$name" />
</preset>
and then used as
<preset id="site" />
The endless loop would continue trying to resolve $name
.
Fixed.
Sitecore 10.1 Support
Sitecore 10.1 introduces a new way for Data Providers to be configured and chained. This required a change in Unicorn.DataProvider.config
.
Unfortunately it is either-or. There is no way to create the needed configuration patch in a manner that is compatible with both pre- and post 10.1 versions.
The default Data Provider remains as is. If you are on a Sitecore version prior to 10.1, you don't need to do anything.
For 10.1 and above, the default Unicorn.DataProvider.config
must be disabled or removed, and the Unicorn.DataProvider.10.1.config.example
but be patched in (remove the .example extension).
Fixed a few configuration/role defaults that got flipped around
Thanks @Kasaku for pointing out this mistake