top of page

Regex Tip for Sitecore Upgrades

If you have ever done a Sitecore upgrade ..... I'm sure you're a drinker ....


One of the most annoying things I've found is that the Regex values are not overwritten properly for the invalid characters. If this same thing has not happened to you ... joy!! Below you will find the changes you need to make. Just uncomment the line with the characters listed, delete the old line and voila!


Old:

<setting name="InvalidItemNameChars" value=""/>
 <!-- <setting name="InvalidItemNameChars" value="\/:?&quot;&lt;&gt;|[]-"/>
 ITEM NAME VALIDATION
 Regular expression for validating item names
 -->
 <setting name="ItemNameValidation" value=""/>
 <!-- <setting name="ItemNameValidation" value="^[\w\*\$][\w\s\-\$]*(\(\d{1,}\)){0,1}$"/>
 ITEM NOT FOUND HANDLER
  Url of page handling 'Item not found' errors
 -->

New

<setting name="InvalidItemNameChars" value="\/:?&quot;&lt;&gt;|[]-"/>
 <!-- ITEM NAME VALIDATION
 Regular expression for validating item names
 -->
 <setting name="ItemNameValidation" value="^[\w\*\$][\w\s\-\$]*(\(\d{1,}\)){0,1}$"/>
 <!-- ITEM NOT FOUND HANDLER
 Url of page handling 'Item not found' errors
 --> 

コメント


bottom of page