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

Updated items are not published #38

Closed
kristofferkjeldby opened this issue Jun 19, 2020 · 6 comments
Closed

Updated items are not published #38

kristofferkjeldby opened this issue Jun 19, 2020 · 6 comments
Assignees
Labels

Comments

@kristofferkjeldby
Copy link

Hi

After upgrading to Rainbow.Storage.Sc 2.1.1.0 (Sitecore 9.2.0) we are facing an issue where items with updated field values are not published during Unicorn sync.

I have traced the issue to Rainbow/src/Rainbow.Storage.Sc/Deserialization/DefaultDeserializer.cs line 649 - if I am reading the code correctly, this should be a catch block, not a finally block?

@cassidydotdk
Copy link
Member

Please tell me more about the specific issue you are experiencing, including any error logs if present. Also, are you running Unicorn with it, and if so which version?

@kristofferkjeldby
Copy link
Author

kristofferkjeldby commented Jun 22, 2020

Hi Cassidy

Sure. We are running a pretty standard Helix/Habitat setup using Rainbow 2.1.1 and Unicorn 4.1.1 with autopublish.

What we are seeing is that an update to a shared field triggers a publish whereas a update to a versioned field does not. I have create a simple test item having shared and a versioned field and added it to a predicate. When changing the the shared field, Unicorn writes out:

Project.Standard is being synced with Dilithium SQL + Serialized enabled.
* [U] SharedField
[U] master:/sitecore/content/TestItem (b2a9f499-9f54-4503-a014-ef88163c81a5)
> Field SharedField - Serialized 'SharedField2', Source 'SharedField1'
Project.Standard sync complete: 83 items evaluated, 1 item modified (0 added, 1 updated, 0 recycled) in 2940ms (~35,43ms/item).

But if we change the versioned field:

Project.Standard is being synced with Dilithium SQL + Serialized enabled.
* [U] da#1: VersionedField
Project.Standard sync complete: 82 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 3364ms (~41,03ms/item).

As you can the, the actual field is updated, but the item is not flagged as changed, and hence not published.

I am pretty sure that if you compare the methods PasteSharedFields and PasteVersion in the deserializer, you'll find that the commitEdit is set to false in the finally block and returned, whereas the commitEdit is returned before the finally block in the PastesSharedFields method. The means that the PasteVersion method will never mark items as changed. I may be overlooking some additional logic, but it seems strange to me.

Best regard
Kristoffer

@cassidydotdk
Copy link
Member

Can you try this without Dilithium, please? it ends up on a very different execution path with Dilithium enabled.

@kristofferkjeldby
Copy link
Author

Hi again

I have tried with and without Dilithium - it makes no difference.

Best Regard
Kristoffer

@zaheer-tariq
Copy link

Hi Guys,

I have created a Pull Request with a fix for this one here #39

cassidydotdk added a commit that referenced this issue Sep 8, 2020
#38 Updated versioned fields in an item are not published
@cassidydotdk cassidydotdk self-assigned this Sep 8, 2020
@cassidydotdk
Copy link
Member

This has been pushed as https://github.com/SitecoreUnicorn/Rainbow/releases/tag/2.1.2

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

No branches or pull requests

3 participants