none
Server Error in '/' Application:Cannot find ContentPlaceHolder 'PlaceHolderPageImage' in the master page '~masterurl/default.mas

    Question

  • Hi all,
     I've customised the pages of my site (which is child to another web site) by modifying default.master page and uploading it. I've set the versioning of files on.
    For some more modifications, I modified the master page and uploaded it. But this time I made a grave mistake of removing the ContentPlaceHolder from the master page.
    From there on I am getting this error: (after I switched off the custom errors)

    Cannot find ContentPlaceHolder 'PlaceHolderPageImage' in the master page '~masterurl/default.master', verify content control's ContentPlaceHolderID attribute in the content page.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Web.HttpException: Cannot find ContentPlaceHolder 'PlaceHolderPageImage' in the master page '~masterurl/default.master', verify content control's ContentPlaceHolderID attribute in the content page.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [HttpException (0x80004005): Cannot find ContentPlaceHolder 'PlaceHolderPageImage' in the master page '~masterurl/default.master', verify content control's ContentPlaceHolderID attribute in the content page.]
    System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +814
    System.Web.UI.Page.get_Master() +48
    System.Web.UI.Page.ApplyMasterPage() +18
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +543

    The parent site is working without any problem. The parent site has 3 child sites. Other 2 are also running fine. Only this site is not opening.
    If I could anyhow revert back to the older version of default.master page or delete the latest version ; it would solve my problem. Anyone know how to do this.

    I am using WSS 3.0 with server farm. I am able to access the content database too. I could see the list of default.master page in dbo.BuildDependencies and other tables.

    Also I tried using the stsadm.exe as shown below:

    C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN>stsadm.exe -o restore -url http://mdc0769c:40450/navteq/qt/_catalogs/masterpage/default.master -filename C:\NavteqIntranet\qt\default.master -overwrite

    "/navteq/qt/_catalogs/masterpage/default.master" contains reserved name. Please
    try another one.

    Anyone with any ideas.

    Tuesday, March 11, 2008 5:00 PM

Answers


  • After busy hours of searching the solutions, being sure that I do not break the working sites, I managed to fix the problem.

    Here are the steps I performed.

    First of all, check that the "Site Action -> Site Settings" (url: http://[server]/[site]/_layouts/settings.aspx) page do not use the master.default page as other site pages do.

    1)  Since the parent site was working fine, I went to the Site Settings
    Under the Galleries block, select Master Pages and go to the Master Page Gallery
    Click on upload and go to the "Upload Master Page: Master Page Gallery"

    2)  Now copy the url.
    For my case the url was: http://mdc0769c:40450/navteq/_layouts/Upload.aspx?List=%7B86A6D35C%2D9CE9%2D4DD7%2DA7BB%2D406425A11712%7D&RootFolder=%2Fnavteq%2F%5Fcatalogs%2Fmasterpage&Source=http%3A%2F%2Fmdc0769c%3A40450%2Fnavteq%2F%5Fcatalogs%2Fmasterpage%2FForms%2FAllItems%2Easpx
    This is the url for uploading the master page for the parent site.

    3)  Now go to the content database for your site (you should have priviledges to access the content database)

    If you are using default configuration of WSS, then you could connect the database using
     server name : \\.\pipe\mssql$microsoft##ssee\sql\query
    If you are using server farm on sqlexpress, then you could connect the database using
     server name : [machine name]\SQLEXPRESS
    Or as configured.

    4)  After connecting the database, go to "Databases --> [site]_Content --> Tables"
    Here we see a list of all the tables for the site content.

    5)  Go to dbo.Webs table. Here we see a list of all the configured web sites.
    Copy the Id (not the siteId) corresponding to your site.

    6)  Now go to the dbo.AllLists table. This table contains information on all the lists and libraries used by all the sites.
    In this table look out for "Master Page Gallery" (tp_Title column) against your web (corresponding to the tp_WebId as copied from step 5 above.)
    Copy the tp_Id for this Master Page Gallery. This is the List parameter specified in the url on step 2 above.

    7) Now url encode the tp_Id (copied in step 6) along with the curly braces "{tp_Id}"
     e.g in my case the tp_Id was 263d37d4-e3be-4017-a12d-12f9d34a5e6f
    After url encode with the curly braces it is %7B263d37d4%2De3be%2D4017%2Da12d%2D12f9d34a5e6f%7D

    8) Modify the url (copied in step 2) with the new List parameter and the site
    e.g in my case the broken site was /navteq/qt, so I replaced /navteq/ with /navteq/qt/ througout
     (at 3 places : the main uri, RootFolder parameter and Source parameter. Need to urlencode in the parameters)
    So the new url looks like this.
    http://mdc0769c:40450/navteq/qt/_layouts/Upload.aspx?List=%7B263D37D4%2DE3BE%2D4017%2DA12D%2D12F9D34A5E6F%7D&RootFolder=%2Fnavteq%2Fqt%2F%5Fcatalogs%2Fmasterpage&Source=http%3A%2F%2Fmdc0769c%3A40450%2Fnavteq%2Fqt%2F%5Fcatalogs%2Fmasterpage%2FForms%2FAllItems%2Easpx

    9) Hit the new url and you would be able to upload the correct master page.

     Hope this works for you too..


    Wednesday, March 12, 2008 8:15 AM

All replies


  • After busy hours of searching the solutions, being sure that I do not break the working sites, I managed to fix the problem.

    Here are the steps I performed.

    First of all, check that the "Site Action -> Site Settings" (url: http://[server]/[site]/_layouts/settings.aspx) page do not use the master.default page as other site pages do.

    1)  Since the parent site was working fine, I went to the Site Settings
    Under the Galleries block, select Master Pages and go to the Master Page Gallery
    Click on upload and go to the "Upload Master Page: Master Page Gallery"

    2)  Now copy the url.
    For my case the url was: http://mdc0769c:40450/navteq/_layouts/Upload.aspx?List=%7B86A6D35C%2D9CE9%2D4DD7%2DA7BB%2D406425A11712%7D&RootFolder=%2Fnavteq%2F%5Fcatalogs%2Fmasterpage&Source=http%3A%2F%2Fmdc0769c%3A40450%2Fnavteq%2F%5Fcatalogs%2Fmasterpage%2FForms%2FAllItems%2Easpx
    This is the url for uploading the master page for the parent site.

    3)  Now go to the content database for your site (you should have priviledges to access the content database)

    If you are using default configuration of WSS, then you could connect the database using
     server name : \\.\pipe\mssql$microsoft##ssee\sql\query
    If you are using server farm on sqlexpress, then you could connect the database using
     server name : [machine name]\SQLEXPRESS
    Or as configured.

    4)  After connecting the database, go to "Databases --> [site]_Content --> Tables"
    Here we see a list of all the tables for the site content.

    5)  Go to dbo.Webs table. Here we see a list of all the configured web sites.
    Copy the Id (not the siteId) corresponding to your site.

    6)  Now go to the dbo.AllLists table. This table contains information on all the lists and libraries used by all the sites.
    In this table look out for "Master Page Gallery" (tp_Title column) against your web (corresponding to the tp_WebId as copied from step 5 above.)
    Copy the tp_Id for this Master Page Gallery. This is the List parameter specified in the url on step 2 above.

    7) Now url encode the tp_Id (copied in step 6) along with the curly braces "{tp_Id}"
     e.g in my case the tp_Id was 263d37d4-e3be-4017-a12d-12f9d34a5e6f
    After url encode with the curly braces it is %7B263d37d4%2De3be%2D4017%2Da12d%2D12f9d34a5e6f%7D

    8) Modify the url (copied in step 2) with the new List parameter and the site
    e.g in my case the broken site was /navteq/qt, so I replaced /navteq/ with /navteq/qt/ througout
     (at 3 places : the main uri, RootFolder parameter and Source parameter. Need to urlencode in the parameters)
    So the new url looks like this.
    http://mdc0769c:40450/navteq/qt/_layouts/Upload.aspx?List=%7B263D37D4%2DE3BE%2D4017%2DA12D%2D12F9D34A5E6F%7D&RootFolder=%2Fnavteq%2Fqt%2F%5Fcatalogs%2Fmasterpage&Source=http%3A%2F%2Fmdc0769c%3A40450%2Fnavteq%2Fqt%2F%5Fcatalogs%2Fmasterpage%2FForms%2FAllItems%2Easpx

    9) Hit the new url and you would be able to upload the correct master page.

     Hope this works for you too..


    Wednesday, March 12, 2008 8:15 AM
  • After this be sure to export your site so that you could import it easily the next time it breaks.

    Use stsadm.exe -o export -url [url to the child site] -filename [filename] to backup the child site.
    (
    You cannot use stsadm.exe -o backup operation if you just need to save the child website, as it backups the whole parent site.)

    Wednesday, March 12, 2008 8:24 AM
  • Refer http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2385015&SiteID=1
    for difference between export and backup.
    Wednesday, March 12, 2008 8:29 AM