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

Bug: Serialize item on item not controlled by Unicorn, does not serialize #219

Closed
JamesSkemp opened this issue Apr 25, 2017 · 3 comments
Closed

Comments

@JamesSkemp
Copy link
Contributor

Do you want to request a feature or report a bug?

Possible bug.

What is the current behavior?

We were having trouble serializing individual items in Sitecore and further digging suggests this might be related to Unicorn (in App_Config\Include\Unicornl\Unicorn.UI.config) patching over itemsync:dumpitem.

/sitecore/content, for example, isn't in any of our Unicorn config files (included or excluded) but if we try to "Serialize item" on /sitecore/content/home we get absolutely nothing (as detailed in the SE question above). If I comment out the following from the Unicorn.UI.config:

<command name="itemsync:dumpitem">
    <patch:attribute name="type">Unicorn.UI.Commands.UnicornDumpItemCommand, Unicorn</patch:attribute>
</command>

I'm once again able to serialize as expected.

The inline documentation states (emphasis my own):

With these installed, if you serialize, load, or revert trees or items in the context of items that are included in Unicorn, regular Sitecore serialization will be replaced with Unicorn reserialization or Unicorn syncing of that item (or tree) instead.

Is this a possible bug, where the Serialize item button isn't passing back into Sitecore? Or do I potentially have a config issue?

We're trying to follow the Helix guidelines and are setting up Foundation, Project, and Feature items. Those do use Unicorn (such as for layout and templates items) and serialize properly.

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

See above.

What is the expected behavior?

Per the comment documentation, pressing Developer > Serialize item on an item that is not controlled by Unicorn should pass this to the standard Sitecore functionality.

Please mention your Sitecore version and Unicorn version.

  • Sitecore 8.1 rev. 160519
  • Unicorn 3.3.2
@JamesSkemp JamesSkemp changed the title Bug: Serialize item on item, not controlled by Unicorn, does not serialize Bug: Serialize item on item not controlled by Unicorn, does not serialize Apr 25, 2017
@kamsar
Copy link
Collaborator

kamsar commented May 3, 2017

This seems like possibly a config issue of some sort.

I tried Serialize Item and Serialize Tree with the current Unicorn 4 prerelease and on non-included paths (/sitecore/layout/Devices, /sitecore/layout/Controllers) they did cause .item files to be written under $(dataFolder)/serialization.

If you review this code you can see that the base command is fallen back to if the item in question is not part of a Unicorn config.

@JamesSkemp
Copy link
Contributor Author

Sorry, we've been doing an upgrade to Sitecore 8.2 Update-3 so I pushed further testing to the back burner. :( This week I'll try pulling down the current code to see if that does anything before I check configs against the docs again.

Thanks!

@JamesSkemp
Copy link
Contributor Author

Crikey, it really took me a month to finish up with this? :(

I updated to the current prerelease versions of Unicorn (4.0.0-pre09) and Rainbow (2.0.0-pre08) and the issue is now resolved.

So, fixed in 4.0?

I also went in and updated the configuration names to match pure-Helix style (Foundation.Serialization) instead of prefixing with short company name (Wsb.Foundation.Serialization) and updated the physical path accordingly (<patch:attribute name="physicalRootPath">$(dataFolder)\src\$(layer)\$(module)\serialization</patch:attribute>), but none of those seem like they would have impacted it. Shrug.

Sorry for the delay on testing out the prerelease verison!

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

2 participants