GithubHelp home page GithubHelp logo

Comments (4)

kamsar avatar kamsar commented on July 18, 2024

Hmm, I can't seem to replicate that on 7.2 U5 which is the oldest thing I have handy. The <r /> values and blank values are synced once and 'stick'.

The message (>) indicates that the comparison is occurring in the Rainbow ItemComparer. For __Lock, there are no custom comparers being used so it'd use the DefaultComparison https://github.com/kamsar/Rainbow/blob/master/src/Rainbow/Diff/Fields/DefaultComparison.cs which is a simple string.Equals() (case sensitive, culture aware).

For diagnostics, you can hook in a custom comparison based on something like https://github.com/kamsar/Rainbow/blob/master/src/Rainbow/Diff/Fields/FieldTypeBasedComparison.cs that targets __Lock specifically. This is registered on the <itemComparer> in Unicorn.config. At that point you can drop into the debugger and see what's going on with the comparison.

That said, I'd call __Lock a field that probably generally belongs on the ignore list by default, which I'll rectify in a minute for the next default config :)

from unicorn.

MacDennis76 avatar MacDennis76 commented on July 18, 2024

Thanks for your detailed reply, I have some more insights to share.

In the source database the <r /> value is explicitly set in the item itself, it is not inherited as a standard value from the template. And therefor the value is also part of the serialized version. In the target database however the <r /> value is not set in the item but already inherited from the template as standard value.

So when syncing and reading the target item it probably gets an empty string from the item itself as it should. Then it tries to persist the <r /> value from serialized item to the target database but this seems to fail because the value is already a standard value so perhaps Sitecore decides not to set it? Could be a Sitcore 6.6 bug?

After checking further, one of the inherited templates had the <r /> value as a standard value on both source and target. Also note that this is an item as part of a branch so perhaps Sitecore treats branches differently when saving branch items.

But I agree that the best thing to do it so exclude this particular field by default.

Is it also correct behaviour the the Unicorn console does not display HTML values?

I have now excluded the __Lock field from the config and performed a resync. Some other different fields to investigate still which are not being persisted correctly, almost there ..

Default sync complete: 9369 items evaluated, 16 items modified (0 added, 16 updated, 0 recycled) in 51739ms (~5,5ms/item).

from unicorn.

kamsar avatar kamsar commented on July 18, 2024

Re standard values differences: Standard values are intentionally ignored when comparing items as they are considered not directly part of the item data. So unfortunately if you've got different standard values across environments this is expected behavior (and those should probably be normalized).

Re: branches. Branches are evaluated once when instantiated and the values become not-standard at that point. If the template has standard values on a branch, the standard values will remain standard.

The HTML display issue has been fixed.

from unicorn.

MacDennis76 avatar MacDennis76 commented on July 18, 2024

Thanks for the explanation. The __Lock issue is fixed (now ingored). Good to know the HTML issue has been fixed.

from unicorn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.