0

I recently updated Sitecore CLI version 4.2.1 to 5.2.113.

I ran dotnet sitecore ser validate --fix and I noticed many of these log entries:

[/sitecore/templates/Branches/Project/ACME CO] INCORRECT FILE PATH: ~/Pages/General Content Page/$name, 
[/sitecore/templates/Branches/Project/ACME CO] found:    ~\ACME CO\Pages\General Content Page\_name.yml,      
[/sitecore/templates/Branches/Project/ACME CO] expected: ~\ACME CO\Pages\General Content Page\#name.yml
[/sitecore/templates/Branches/Project/ACME] [M] ~\ACME CO\Pages\General Content Page\_name.yml -> ~\ACME CO\Pages\General Content Page\#name.yml

scs changes in console

Notice how the branch template $name item's file path changed from _name.yml to #name.yml.

Why was this change made?

None of the release notes mention it:

1 Answer 1

2

This conversion from Dollar('$') to ('#') is occuring from the below code snippet inside Sitecore.DevEx.Serialization.Client.dll, which converts all the invalid file characters to '#' symbol.

enter image description here

I believe the changes were made to address and convert all the invalid characters to '#' using above code snippet.

Inside version 4.2.1 of Sitecore.DevEx.Serialization.Client dll, invalid file characters were replaced with underscore('_') symbol.

enter image description here

Below is the list of characters that are considered to be avoided in filenames.

https://www.mtu.edu/umc/services/websites/writing/characters-avoid/

Hope this helps!!!

2
  • Thank you for investigating. What is perplexing is that _ is objectively safer for file names than #. Even the article you shared does not recommend using #. Commented Mar 19 at 16:34
  • 1
    ya I just checked version 4.2.1 Sitecore.DevEx.Serialization.Client dll...in that invalid file characters are replaced with underscore('-') character. Hence you are getting this warning now with the upgraded version i.e. above 5.
    – ckhanna
    Commented Mar 19 at 17:41

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.