locked
"ERROR:There are characters in the page URL name that are not valid. Type a different name." RRS feed

  • Question

  • Dear all,

    Will any body help to sort out the error am getting in publishing site.

    ERROR:There are characters in the page URL name that are not valid. Type a different name.

    Am using a custom content type with Fields for a page layout and after deploying content type and when trying to create a new page am getting the error.

    Log:  A critical error occurred while creating a PublishingPage through PublishingPageCollection.Add(string, PageLayout).

     Microsoft.SharePoint.SPException: The URL 'Pages/abcdef.aspx' is invalid.  It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web. ---> System.Runtime.InteropServices.COMException (0x81020030): The URL 'Pages/abcdef.aspx' is invalid.  It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.  at Microsoft.SharePoint.Library.SPRequestInternalClass.PutFile(String bstrUrl, String bstrWebRelativeUrl,Object varFile, PutFileOpt PutFileOpt, String bstrCreatedBy, String bstrModifiedBy, Int32 iCreatedByID, Int32 iModifiedByID, Object varTimeCreated, Object varTimeLastMod...

     

    Many Thanks in advance !!!


    Praveen Mandalapu
    • Edited by Mike Walsh FIN Friday, April 15, 2011 7:43 AM Quotes put around text of error message. otherwise Caps are not allowed in Titles
    Friday, April 15, 2011 7:35 AM

Answers

  • hi,

    I would suggest to go by steps: At first leave only master page and one problematic page layout (in order to avoid affecting of another page layouts). Check will it work or not.

    Then change Url and Path attributes from "News Article.aspx" to "NewsArticle.aspx" (remove space inside URL) and try again. Also I would change Title from "News Article.aspx" to just "News Article". But this is not necessary.


    Blog - http://sadomovalex.blogspot.com
    CAML via C# - http://camlex.codeplex.com
    • Marked as answer by Emir Liu Friday, April 22, 2011 2:13 AM
    Monday, April 18, 2011 12:20 PM

All replies

  • Hi Praveen,

    Are you using any of the below characters in URL creation

    # % & * : < > ? / \ { | }

    if yes try to avoid them and then create a page.

    also please refer 

    http://support.microsoft.com/kb/2019030


    Warm Regards, Pratik Vyas | SharePoint Consultant | http://sharepointpratik.blogspot.com/
    Friday, April 15, 2011 11:05 AM
  • Hello Pratik,

    Many thanks for the quick reply !!!

    Hopefully am no where using the characters you had mentioned.And also please suggest will it reflect anything from our code since because i had rechecked all my code. what will be the chance for us to have this characters dynamically when creating the page.

    And many thanks for the Quick reference post, now am looking on it.

    Regards,


    Praveen Mandalapu
    Friday, April 15, 2011 11:36 AM
  • mentioned URL (Pages/abcdef.aspx) is correct, may be something wrong in page layout and content type configurations. Can your post your code here (xml which provisions content type and page layout)?
    Blog - http://sadomovalex.blogspot.com
    CAML via C# - http://camlex.codeplex.com
    Friday, April 15, 2011 12:09 PM
  • Hello sadomovalex,

    Thanks for the prompt reply,

    Please have a look at the below .xml files and kindly suggest me where am going wrong,

    module.xml for Page Layouts:

    <?xml version="1.0" encoding="utf-8"?>
    <Elements Id="7acfd56c-b6f3-480d-8541-3203f7703b12" xmlns="http://schemas.microsoft.com/sharepoint/">
     <Module Name="MasterPageGalleryModule" Url="_catalogs/masterpage" RootWebOnly="TRUE">
     
    <!-- Custom Master Page-->
    
      <File Url="CustomMasterPage.master" Path="CustomMasterPage.master" Type="GhostableInLibrary">
       <Property Name="ContentType" Value="$Resources:cmscore,contenttype_masterpage_name;" />
       <Property Name="Title" Value="Custom Master Page" />
      </File>
    <!-- Custom Master Page-->
    
    <!-- Page layouts-->
    
      <File Url="Blank 2 Column Page.aspx" Path="Blank 2 Column Page.aspx" Type="GhostableInLibrary">
       <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;" />
       <Property Name="PublishingAssociatedContentType" 
    
    Value=";#Intranet;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390064DEA0F50FC8C147B0B6EA0636C4A7
    
    D4;#" />
       <Property Name="Title" Value="Blank 2 Column Page.aspx" />
      </File>
      
    <!-- Error where am getting when using the below Page layout -->
    
      <File Url="News Article.aspx" Path="News Article.aspx" Type="GhostableInLibrary">
       <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;" />
       <Property Name="PublishingAssociatedContentType" Value=";# 
    
    Intranet;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390064DEA0F50FC8C147B0B6EA0636C4A7D4;#" />
       <Property Name="Title" Value="News Article.aspx" />
      </File>
    
      <File Url="Services 3 Column Page.aspx" Path="Services 3 Column Page.aspx" Type="GhostableInLibrary">
       <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;" />
       <Property Name="PublishingAssociatedContentType" Value=";# 
    
    Intranet;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390064DEA0F50FC8C147B0B6EA0636C4A7D4;#" />
       <Property Name="Title" Value="Services 3 Column Page.aspx" />
      </File>
     
     </Module>
    </Elements>
    Content Types.xml    <?xml version="1.0" encoding="utf-8"?>
    <Elements Id="d83a4cb9-b484-4419-8ce4-f9bcc1c06801" xmlns="http://schemas.microsoft.com/sharepoint/">
     
      <ContentType 
    
    ID="0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF39001F843ABEFC9B0B4AB1F2A232960C6E89"
             Name="News Detail"
             Group="Page Layout Content Types"
             Description="Custom Content Type"
             Version="0">
       <FieldRefs>
    
    
        <FieldRef ID="{6FBF318C-05EA-4f34-9D90-EA2B7EB74D98}" Name="Title" />
        <FieldRef ID="{B170BEAD-A1EA-41ea-B634-210807BD130E}" Name="News Title" />
        <FieldRef ID="{025E1761-3EFC-4aef-A137-F598DDE527DD}" Name="News Author" />
        <FieldRef ID="{A3DB946B-945D-4fc1-8048-F116737A7A94}" Name="News Long Date" />
        <FieldRef ID="{370E54CA-E64E-41e0-9660-358A8940F29F}" Name="PublishingRollupImage" />
        <FieldRef ID="{FE77373A-1063-48f4-AD9F-213398611FD0}" Name="News Image Caption" />
        <FieldRef ID="{733154AF-3202-430d-BBFA-E80F027D5DB4}" Name="News Summary" />
        <FieldRef ID="{D320DAA7-B048-47e8-8693-78564872DEA6}" Name="News Link" />
        <FieldRef ID="{7DE6663E-3508-44f0-AE26-BFEF5C5E30D9}" Name="News Categories" />
        <FieldRef ID="{C0196434-4143-4dc4-910E-99D10C16CFB6}" Name="News Featured" />
        <FieldRef ID="{635C5DA6-F0F0-4500-BBA2-4F42DF63A5FC}" Name="News Body" />
        <FieldRef ID="{DBBFE80E-9B2B-4361-B2F6-87E2598C6F34}" Name="News Date" />
    
    
       </FieldRefs>
      </ContentType>
    
      <Field ID="{6FBF318C-05EA-4f34-9D90-EA2B7EB74D98}"
          Type="Text"
          Name="CustomSingleLineOfText"
          DisplayName="Title"
          StaticName="CustomSingleLineOfText"
          Hidden="FALSE"
          Required="FALSE"
          Sealed="FALSE" />
    
      <Field ID="{B170BEAD-A1EA-41ea-B634-210807BD130E}"
          Type="Text"
          Name="CustomSingleLineOfText"
          DisplayName="News Title"
          StaticName="CustomSingleLineOfText"
          Hidden="FALSE"
          Required="FALSE"
          Sealed="FALSE" />
    
      <Field ID="{025E1761-3EFC-4aef-A137-F598DDE527DD}"
          Type="Text"
          Name="CustomSingleLineOfText"
          DisplayName="News Author"
          StaticName="CustomSingleLineOfText"
          Hidden="FALSE"
          Required="FALSE"
          Sealed="FALSE" />
    
    
      <Field ID="{A3DB946B-945D-4fc1-8048-F116737A7A94}"
          Type="Calculated"
          Name="CustomDate"
          DisplayName="News Long Date"
          StaticName="CustomDate"
          Hidden="FALSE"
          Required="FALSE"
          Sealed="FALSE" >
       <Formula>=TEXT([News Date],"mmmm d, yyyy")</Formula>
      </Field>
    
      <Field ID="{DBBFE80E-9B2B-4361-B2F6-87E2598C6F34}"
         Type="DateTime"
         Name="Custom News Date"
         DisplayName="News Date"
         StaticName="Custom News Date"
         Hidden="FALSE"
         Required="FALSE"
         Sealed="FALSE" />
    
    
    
      <Field ID="{370E54CA-E64E-41e0-9660-358A8940F29F}"
          Type="Image"
          Name="CustomPublishingRollupImage"
          DisplayName="PublishingRollupImage"
          StaticName="CustomPublishingRollupImage"
          Hidden="FALSE"
          Required="FALSE"
          Sealed="FALSE" />
    
      <Field ID="{FE77373A-1063-48f4-AD9F-213398611FD0}"
          Type="HTML"
          Name="Custom News Image Caption"
          DisplayName="News Image Caption"
          StaticName="Custom News Image Caption"
          Hidden="FALSE"
          Required="FALSE"
          Sealed="FALSE" />
    
      <Field ID="{733154AF-3202-430d-BBFA-E80F027D5DB4}"
          Type="Note"
          Name="Custom News Summary"
          DisplayName="News Summary"
          StaticName="Custom News Summary"
          Hidden="FALSE"
          Required="FALSE"
          Sealed="FALSE" />
      <Field ID="{D320DAA7-B048-47e8-8693-78564872DEA6}"
          Type="Text"
          Name="Custom News Link"
          DisplayName="News Link"
          StaticName="Custom News Link"
          Hidden="FALSE"
          Required="FALSE"
          Sealed="FALSE" />
    
      <Field ID="{7DE6663E-3508-44f0-AE26-BFEF5C5E30D9}"
          Type="Choice"
          Name="Custom News Categories"
          DisplayName="News Categories"
          StaticName="Custom News Categories"
          Hidden="FALSE"
          Required="FALSE"
          Sealed="FALSE" />
    
      <Field ID="{C0196434-4143-4dc4-910E-99D10C16CFB6}"
          Type="Boolean"
          Name="Custom News Featureds"
          DisplayName="News Featured"
          StaticName="Custom News Featured"
          Hidden="FALSE"
          Required="FALSE"
          Sealed="FALSE" />
    
    
      <Field ID="{635C5DA6-F0F0-4500-BBA2-4F42DF63A5FC}"
          Type="HTML"
          Name="Custom News Body"
          DisplayName="News Body"
          StaticName="Custom News Body"
          Hidden="FALSE"
          Required="FALSE"
          Sealed="FALSE" />
     </Elements>

    Praveen Mandalapu
    Friday, April 15, 2011 1:09 PM
  • hi,

    I would suggest to go by steps: At first leave only master page and one problematic page layout (in order to avoid affecting of another page layouts). Check will it work or not.

    Then change Url and Path attributes from "News Article.aspx" to "NewsArticle.aspx" (remove space inside URL) and try again. Also I would change Title from "News Article.aspx" to just "News Article". But this is not necessary.


    Blog - http://sadomovalex.blogspot.com
    CAML via C# - http://camlex.codeplex.com
    • Marked as answer by Emir Liu Friday, April 22, 2011 2:13 AM
    Monday, April 18, 2011 12:20 PM