SharePoint 2013 – The file or folder name “_catalogs” contains invalid characters. Please use a different name. Common invalid characters include the following: # % & * : ? / { | }

The file or folder name “_catalogs” contains invalid characters

I am trying to deploy a master page in SharePoint 2013:

<Module Name=“MasterPages2013“ Url=“_catalogs/masterpage/“ >

  <File Path=“MasterPages2013\MyMaster2013.html“ Url=“MyMaster2013.html“ Type=“GhostableInLibrary“ Level=“Draft” ReplaceContent=“true“>

    <Property Name=“ContentTypeId“ Value=“0x01010500BF544AFE46ACEF42B8DA22C9CE89526E“ />

    <Property Name=“UIVersion“ Value=“15“ />

    <Property Name=“Title“ Value=“Your Master Page Title“ />

    <Property Name=“ContentType“ Value=“Master Page“ />

    <Property Name=“_ModerationStatus“ Value=“0“ />

    <Property Name=“FSObjType“ Value=“0“ />

</File>

    <File Path=“MasterPages2013\MyMaster2013.master“ Url=“MyMaster2013.master“ Type=“GhostableInLibrary“ Level=“Draft“ ReplaceContent=“true“>

    <Property Name=“ContentTypeId“ Value=“0x01010500BF544AFE46ACEF42B8DA22C9CE89526E“ />

    <Property Name=“UIVersion“ Value=“15“ />

    <Property Name=“Title“ Value=“Your Master Page Title“ />

    <Property Name=“ContentType“ Value=“Master Page“ />

    <Property Name=“_ModerationStatus“ Value=“0“ />

    <Property Name=“FSObjType“ Value=“0“ />

</File>

</Module>

When I deploy the solution I’m getting the following:

Error occurred in deployment step ‘Activate Features’: The file or folder name “_catalogs” contains invalid characters. Please use a different name. Common invalid characters include the following: # % & * : ? /  { | }

 

Solution

The problem is in the following line:

<Module Name=“MasterPages2013“ Url=“_catalogs/masterpage/IMOBranding2013/“ >

The additional ‘/’ had to be removed from the Url. Changing it to the following worked:

<Module Name=“MasterPages2013“ Url=“_catalogs/masterpage/IMOBranding2013/“ >

 

Additional Note

The same error also occurs when the Url inside the field starts with a ‘/’

<File Path=“MasterPages2013\MyMaster2013.master“ Url=“/MyMaster2013.master” … /> 

 

Advertisements

Please leave a comment or feedback

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.