SOLUTION: COPY AND PASTE ISSUE WITH JAPANESE LANGUAGE PREFERENCE IN SDL WEB 8

Recently one of our client reported a bug in web 8.

If user choose Japanese as there language preference, then they are not able to use copy paste functionality for all the items (like component, page, folder, structure group).

I am able to reproduce the same in web 8.5 as well.

Error Message (In Japanese ): In case of Folder and Structure Group  


English Translation:

The Pattern constraint failed. The value of property 'Directory' is invalid. The value violates the restriction of the user schema.

Error Message (In Japanese ): In case of Component and Pages

English Translation:

The Pattern constraint failed. The value of property 'Filename' is invalid. The value violates the restriction of the user schema.

 

Here is the simple resolution available for this -

  • In the CMS server go to SDL_HOME/bin folder.
  • Locate the cm_xml_usr.xsd and take a backup of that.
    For Folder / Structure Group - Open that file and search for “Directory”
    <xsd:simpleType name="Directory"> <xsd:restriction base="xsd:string">
    <xsd:maxLength value="255"/>
    <xsd:pattern value="[-a-zA-Z0-9!\(\)_~.]*"/>
    </xsd:restriction></xsd:simpleType>
           
           For Component / Page- Open that file and search for “FileName”

           <xsd:simpleType name="FileName">
               <xsd:annotation>
                   <xsd:documentation>Simple type used to restrict file names</xsd:documentation>
               </xsd:annotation>
               <xsd:restriction base="xsd:string">
               <xsd:maxLength value="512"/>
               <xsd:pattern value="[-a-zA-Z0-9!\(\)_~.&amp;\ ]+"/></xsd:restriction>
          </xsd:simpleType>

  • Replace the xsd:pattern with the below pattern -

    <xsd:pattern value="[-\w0-9!\(\)_~.&amp;\ ]+"/>

  • Restart IIS and SDL services and try.

 

That's it :)