I have a dictionary entry whose phrase value solely consists of a single pipe symbol. The item gets serialized just fine. But when I synchronize it, the phrase value of the created dictionary entry is empty.

I was able to replicate the same behavior with content items. It's therefore not specific to dictionary entries.

I noted the pipe symbol is a special character in yaml files that preserves line breaks. So I tried using another special character, namely the >, which folds new lines. The item got synchronized without a problem and a single > appeared in the field. Hence it doesn't seem to be related to special characters in yaml files in general.

Additionally I happened to notice that the value of some items like __Created by start with a single pipe symbol followed by a line break and the actual value on a new line. For example:

- ID: "5dd74568-4d4b-44c1-b513-0af5f4cda34f"
  Hint: __Created by
  Value: |

In Sitecore the value of the field after synchronisation still only contains the sitecore\admin and no |. Accordingly a single pipe symbol on a line seems to get special treatment.

In the meantime I'm using a symbol that looks almost like a pipe. But I wonder if there is another solution to this and if this is supposed or tolerated behavior.


Following the comment below I tried to manually replace the vaule similar to the __Created by field. After synchronizing it the value of the phrase field was a single pipe as expected. I then changed the key value to see how the item gets serialized. Serialization of course led again to a single pipe symbol in the yaml file. Lastly I changed the key value back to it's original value and to my surprise the phrase value in the yaml file was now empty. I tried the same procedure with a simple single line field of a content item and could replicate it. Using the unicorn control panel to reserialize didn't raise the issue.

Another interesting observation I made: Using a single pipe followed by a blank space works just as it should and none of the aformentioned problems occur.

Even though workarounds exist this doesn't seem to be desirable behavior. It would be great if someone could clarify why this happens.

To summarize up the issue:

  • I have a field with a single pipe symbol as a value.
  • Serializing it for the first time creates a correct yaml file.
  • Serializing it again through changing some other value of the item results in an empty value instead of the pipe in the yaml file.
  • Synchronizing the correct yaml file results in an empty field in Sitecore.
  • Have you tried escaping? What happens if you manually replace the Value: to be similar to that of the __created by field? However instead of 'sitecore\admin' you get put your | symbol as the value? Also try the > than sign to escape instead of the pipe above. Then see if that serializes ?
    – Anicho
    Feb 6, 2019 at 15:46

2 Answers 2


The behavior you're observing with the single pipe symbol in a field value during serialization and synchronization could be related to the YAML serialization library's interpretation of that character. YAML uses the pipe symbol (|) as a block scalar indicator, which is commonly used for multiline strings. In some cases, special handling of this character might cause unexpected behavior during serialization and synchronization.

Here are some insights and recommendations:

1. Special Characters in YAML:

YAML has specific rules for handling special characters, and the pipe symbol is one of them. It's often used to indicate a block scalar, and its handling might vary based on the YAML parser used.

2. Workaround with Space:

As you mentioned, using a single pipe symbol followed by a blank space seems to work without issues. If possible, consider adopting this workaround to ensure consistent behavior.


I just ran into this same issue, but it wouldn't help to add the space for me, as I am using this to tell code to split on a string, and a space is a good use case. I wonder if Unicorn is open source, could step through and see what Sync is doing, but I'm sure it must be using the | not as a value but as a control character. Here is my yml chunk for your perusal.

    - ID: "15cc6a99-c3b5-4a1b-ac19-6a0daa0e2568"
      Hint: Calculated Pim Item Field
      Value: "{CD91626A-38C7-417A-8DA7-095843B517A8}"
    - ID: "25bed78c-4957-4165-998a-ca1b52f67497"
      Hint: __Created
      Value: 20190329T194313Z
    - ID: "4b66ed1b-2c19-48b4-adbd-5e5b2914b033"
      Hint: Calculated Index Field Name
      Value: digitalspecialfeaturesimageurls
    - ID: "5dd74568-4d4b-44c1-b513-0af5f4cda34f"
      Hint: __Created by
      Value: |
    - ID: "cea2afe6-040a-46df-b974-e4edf23ce594"
      Hint: String To Split The Values On
      Value: |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.