MOSS Page Setting Error - Value does not fall within the expected range

We are getting error “Value does not fall within the expected range” when try to change the “Page Setting” in MOSS 2007. Yes, again same error message as in here (In fact, this error occurs is various scenarios). This error only happens when you copy an aspx page using SharePoint designer from one server to another severs (development server to production server).  Once you try to edit the Page Setting, the error will occurs. We did some googling around but no luck. Some sites mention that the page is link to the old Page Layout’s URL and we are not able to change it since we cannot access the page setting. But, there are a workaround where you can solve it! Here are the steps:

  1. You cannot copy and paste the aspx page using SharePoint designer. First, export the aspx page using SharePoint designer to a physical file.
  2. Open the aspx page with notepad and search on the “mso:PublishingPageLayout”. You will notice your development portal URL is there.
    <mso:PublishingPageLayout msdt:dt=”string”>http://xxxdevelopmenturl/_catalogs/masterpage/BlankWebPartPage.aspx, Blank Web Part Page</mso:PublishingPageLayout>
  3. Replace your development URL (xxxdevelopmenturl) to the production URL and save it.
  4. Open your production site with SharePoint Designer and import the modified aspx page.

That’s all. You should able to change the page setting without any error. Do note that if you are using reporting services in the aspx page, you can replace all the report’s URLs too. In that case, you do not need to reconfigure all the web parts again. This saves us a lot of effort since our aspx page contains more than 25 web parts. It will take us hours to reconfigure the report URL and parameters. 

** Special thanks to Mr. Goh TH who point out the Page Layout URL issue!

Posted in SharePoint.

10 Responses to “MOSS Page Setting Error - Value does not fall within the expected range”

  1. Christy Says:

    Hello,
    Thank you so much for your post. I ran into this exact problem and this was the exact fix for it. I also noticed that I could use Site Content and Structure to get to the page settings, change the layout to something else, save. Go back to editing the page select page>>page settings and schedule>> and then change the layout back to the old layout. This corrects the link issue from changing the development to production URL. Thanks again!

  2. Ryan Lee Says:

    Try either of these:

    http://blog.thekid.me.uk/archive/2007/08/20/fixing-page-layout-urls-after-importing-a-publishing-site-in-sharepoint.aspx
    http://stsadm.blogspot.com/2007/08/fix-publishing-pages-page-layout-url.html

  3. ¥ong¥s Says:

    Ryan provide a great reference tools to help you fix the imported pages. We migh use the same concept to replace the report URL as well! The other thing i found out after imported a page is all the web parts’ location are run out. All web parts are set to “right” web part zone. Anyone know how to fix this?

  4. Mark Kamoskim Says:

    Well, I was very happy to find your post– until I found out that it did not work for me. You see, the file causing this error is the >SomeList, >Settings, >ListSettings, >TitleDescriptionAndNavigation, which is
    https://www.MySite.com/sites/MySubSite/_layouts/ListGeneralSettings.aspx . I tried opening this file C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\ListGeneralSettings.aspx and then looking for “PublishingPageLayout”, as you suggest– but, sadly for me, that token does not exist in the code. Ug. If you have any other ideas, then please send them along. (Sheesh, this is the umpth-teenth time something like this has broken in SharePoint– it leads me to say, one more time– I would really love SharePoint if it just worked). Thanks anyway. — Mark Kamoski

  5. ¥ong¥s Says:

    Hi Mark,
    You need to use sharepoint designer to open your sharepoint (MySite for your case) site. Look for that file and export out to a physical file. From there, you should able to find the “PublishingPageLayout” Setting. You can’t check the file in “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\” since file in sharepoint site are store in content database (SQL server).

  6. Mark Kamoski Says:

    Regarding this…
    “You need to use sharepoint designer to open your sharepoint (MySite for your case) site. Look for that file
    ListGeneralSettings.aspx
    …I forgot to say that I already did that and that file “ListGeneralSettings.aspx” does not exist anywhere in the site– that is, I looked everywhere with SharePoint Designer. In fact, the folder… https://www.MySite.com/sites/MySubSite/_layouts/ …does not exist or it is inaccessible to SharePoint Designer. These folders do exist…
    _catalogs
    _cts
    _private
    _themes
    images
    Lists
    m
    …so do you have any other ideas?
    Please advise.
    Thank you.
    – Mark Kamoski

  7. ¥ong¥s Says:

    Hi Mark,
    Your problem seems different from what i have here. Can you describe how you get the error?

  8. Mark Kamoski Says:

    Below are the complete details of my issue, copied from other postings.

    I really need some help with this because I am stuck.

    If you have any ideas at all, then please let me know ASAP.

    Thank you very much.

    2008-03-18 8:03 AM

    http://www.sharepointu.com/forums/p/2944/8268.aspx#8268

    All –

    Please help.

    Something happened to my site and using any login, the problems are as follows…
    1. Choosing >ListAllSiteContents, >Create, is broken whereby it does not show the full set of content types.

    2. Choosing >ListAllSiteContents, does not list the site contents.

    3. Choosing >AnyList, >Settings, >ListSettings, >TitleAndDescription, yields a run-time-error or “Value does not fall within the expected range”.

    This looks like a configuration change, at the server-level or the site-level– but, I cannot find it.

    I did not change anything.

    This is a critical bug for this site and affects a lot of things.

    Can you help?

    Please advise.

    (It is times like these that make me say– “SharePoint would be great if it only worked”.)

    Thank you.

    – Mark Kamoski

    2008-04-01 3:45 PM

    http://www.sharepointu.com/forums/p/2944/8268.aspx#8268

    All –

    Relative to my post above, I was able to set customErrors mode=false, as suggested here…

    http://yyonline.wordpress.com/2007/12/19/get-more-moss-error-log-instead-of-an-unexpected-error-has-occurred/

    …and that showed a bit more information, as follows…

    …when going to this page…

    https://www.MyName1.com/sites/MyName2/_layouts/ListGeneralSettings.aspx?List=%7B08470502%2D4721%2D4445%2DA906%2DE99265783BFF%7D

    …I get this error…

    Value does not fall within the expected range. at Microsoft.SharePoint.SPListTemplateCollection.FindServerTemplate(Guid featureId, Int32 templateType)
    at Microsoft.SharePoint.SPList.get_ServerTemplate()
    at Microsoft.SharePoint.SPList.get_OnQuickLaunch()
    at Microsoft.SharePoint.ApplicationPages.ListGeneralSettingsPage.OnLoad(EventArgs e)
    at System.Web.UI.Control.LoadRecursive()
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    …and I know that the ID is valid.

    Any ideas?

    Please advise.

    Thank you.

    – Mark Kamoski

  9. ¥ong¥s Says:

    Hi Mark,

    Sorry, I was busy with my work recently. Please give me some time to study your case and revert back to your later…Cheers.

  10. MOSS Page Setting Error - Value does not fall within the expected range « yyTech Blog on .Net, SQL, SharePoint, Collaboration and tech tips. Says:

    [...] Read the rest of this entry (moved to http://www.bronios.com) » Possibly related posts: (automatically generated)How I became a soldier in the Georgia-Russia cyberwar. Posted in SharePoint. Tags: MOSS Page setting, Sharepoint 2007 error. [...]

Leave a Reply