Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some directories could not be loaded, trying to sync items through Unicorn. #368

Open
MortenSkjoldager opened this issue Oct 16, 2019 · 0 comments

Comments

@MortenSkjoldager
Copy link

MortenSkjoldager commented Oct 16, 2019

Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Programatically syncing configuration breaks, but doing this through Unicorn.aspx works fine.

If the current behavior is a bug, please provide the steps to reproduce.

Trying to import configuration and Yaml files programmatically with the following code snippet:

public virtual void SynchroniseTargetDataStore(IConfiguration configuration)
		{
			var logger = configuration.Resolve<ILogger>();
			var helper = configuration.Resolve<SerializationHelper>();

			try
			{
				logger.Info(string.Empty);
				logger.Info("Unicorn.Bootstrap is syncing " + configuration.Name);

				var pathResolver = configuration.Resolve<PredicateRootPathResolver>();

				using (new EnforceVersionPresenceDisabler())
				{
					helper.SyncTree(configuration);
				}
			}
			catch (Exception ex)
			{
				logger.Error(ex);
				throw;
			}
		}

I have also tried to sync each subtree, same result.
what is the difference between synctree and syncconfiguration? I tried to .peek the sync verb and that seems to run syncconfiguration. That seems like it is not an option for me in this case?

What is the expected behavior?
Sync should work without an exception "some directories could not be loaded".
Please mention your Sitecore version and Unicorn version.

Sitecore 9.2, Unicorn 4.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant