1

Is it possible to have a directory of a Structure Group starting with dot .?

We are migrating from an existing project to Tridion and maintaining same folder structure in Tridion. Some of the folders in these project begin with dot.

But Tridion does not allow to have a directory name starting with dot.

Note: Even windows wont allow to create a folder starting with a dot, unless you create with command prompt or keep the folder name like .<foldername>.

1
  • Do you think it is smart to create Structure Group folder name using characters which aren't allowed on the filesystem the machine is installed on? I guess it might be safe using when you are publishing to a unix filesystem, but even then I wouldn't choose those type of folder names I think (since all they are is a dirty way of hiding the folder from a ls command). Commented Jul 5, 2016 at 14:48

2 Answers 2

7

It is is possible to allow additional characters to be used for Directories and Filenames. However your filesystem obviously needs to allow it, and you are required to modify the Tridion System Schema.

To modify the system schema, you must edit the cm_xml_usr.xsd file, located inside ..\Tridion\bin\ and modify the regexp pattern inside the name="FileName" (or name="Directory") element to allow whatever characters you want to allow:

<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>

But please note, if you allow characters that aren't allowed on the taget filesystem, all you did is just break the systems ability to publish/deploy.

4
  • Bart - Does this take the implementation out of support? (i.e. is this a valid extension point?) Commented Jul 6, 2016 at 9:21
  • 1
    @Dylan..MarkSaunders the system schema (cm_xml_usr.xsd) is a user configuration file, so you are allowed to modify this indeed without it voiding your support agreement. Keep in mind, you can screw up and make your system unable to publish, but Support should be able to help you get it back in a working state (although I'd save myself the trouble and make sure I backup the original regex and make sure the changes I make are allowed by the filesystem I publish too) Commented Jul 6, 2016 at 9:24
  • I figured it was Bart (not least it was previously) and the _usr in the filename :) The main reason I asked as I know this was documented officially in Tridion 2011 but can't see it in the Tridion 2013SP1 or Web8 Docs - but thanks for the confirmation. Commented Jul 6, 2016 at 9:26
  • 1
    @Dylan..MarkSaunders It is mentioned in the Web 8 documentation, but under the Translation Manager functionality inroduced in Web 8 docs.sdl.com/LiveContent/content/en-US/SDL%20Web-v1/… Commented Jul 6, 2016 at 9:36
1

The structure group name can contain a . but the StructureGroup directory name cannot contain a .. Since the CM runs on Windows, only windows OS valid paths are allowed in SG directory name.

If you try create a SG with directory name that begins with . you will end up seeing the following:

enter image description here

4
  • 2
    Can't you change this in the CM restrictions XML file (can't remember the file name right now)
    – Nuno Linhares
    Commented Jul 5, 2016 at 13:01
  • Not that I know of :S
    – Kunal
    Commented Jul 5, 2016 at 13:09
  • 1
    The file I saw in other posts is system Schema (cm_xml_usr.xsd, this file is located in the Tridion bin directory). I was hoping to have something easier to implement. Commented Jul 5, 2016 at 13:51
  • 1
    Yeah, Bart and Andrey go over that option in this question: tridion.stackexchange.com/questions/5542/…. Maybe easier is just replacing the dot with something else? Commented Jul 5, 2016 at 14:16

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.