I have just created a fresh install of Umbraco 4.0.3 and have hit an odd error. So far I have created a Master template and two Doc Types that use that master template.
However when I run the site, I get this error.
Cannot find ContentPlaceHolder 'ContentPlaceHolderDefault'
in the master page '/masterpages/Master.master', verify content
control's ContentPlaceHolderID attribute in the content page.
I there you can see Umbraco in the background with the 'Master' teplate selected. That ContentPlaceHolder does exist.
In one of the Doc Type templates you can see it shares the same ContentPlaceHolder name.
What is going on here? This is the start of the 3rd Umbraco site I have done and I have never seen this happen before.
Content placeholder ID's aren't recursive, if the direct parent doesn't have a <asp:Content ID="ContentPlaceholderDefault" runat="server" /> then you will receive the error.
The umbraco 'default' masterpage has that Content Placeholder, but my assumption is that you haven't created it in your Master.master file.
When you create a new masterpage from the Umbraco UI it uses a standard template, it doesn't look at the specified parent to create the appropriate Content Placeholders (like Visual Studio does).
I think I understand why to got this error but I'm not sure why it happened at all (how I could have messed it up so much). At least I'll know where to start looking it happens again :)
I encountered a similar error first time after install Umbraco by WebMatrix today. The error come when accessing the 'Company Blog Post' page.
Cannot find ContentPlaceHolder 'cp_header' in the master page '/masterpages/umbMaster', verify content control's ContentPlaceHolderID attribute in the content page
Diving into Settings > Templates > Starterkit Master: Blog post page. I find this .js container with 'cp_head' id
Cannot find ContentPlaceHolder 'ContentPlaceHolderDefault' ??
I have just created a fresh install of Umbraco 4.0.3 and have hit an odd error. So far I have created a Master template and two Doc Types that use that master template.
However when I run the site, I get this error.
Cannot find ContentPlaceHolder 'ContentPlaceHolderDefault' in the master page '/masterpages/Master.master', verify content control's ContentPlaceHolderID attribute in the content page.
I there you can see Umbraco in the background with the 'Master' teplate selected. That ContentPlaceHolder does exist.
In one of the Doc Type templates you can see it shares the same ContentPlaceHolder name.
What is going on here? This is the start of the 3rd Umbraco site I have done and I have never seen this happen before.
For some reason this forum stripped out my image tags..
I'lll try again..
You can see the images at...(you may have to copy and paste them from here)
http://www.users.on.net/~bradford/Images/Umbraco/UmbracoError1.jpg
and
http://www.users.on.net/~bradford/Images/Umbraco/UmbracoError2.jpg
here goes..
Content placeholder ID's aren't recursive, if the direct parent doesn't have a <asp:Content ID="ContentPlaceholderDefault" runat="server" /> then you will receive the error.
The umbraco 'default' masterpage has that Content Placeholder, but my assumption is that you haven't created it in your Master.master file.
When you create a new masterpage from the Umbraco UI it uses a standard template, it doesn't look at the specified parent to create the appropriate Content Placeholders (like Visual Studio does).
I got it sussed.
The Master Template was created first, and put one of these
in it at the spot I wanted the content of the pages to appear. Wrong.
It needed to be this..
Then in the Home Doc type and the Page Doc type templates, I just had to do this.
I think I understand why to got this error but I'm not sure why it happened at all (how I could have messed it up so much). At least I'll know where to start looking it happens again :)
I encountered a similar error first time after install Umbraco by WebMatrix today. The error come when accessing the 'Company Blog Post' page.
Cannot find ContentPlaceHolder 'cp_header' in the master page '/masterpages/umbMaster', verify content control's ContentPlaceHolderID attribute in the content page
Diving into Settings > Templates > Starterkit Master: Blog post page. I find this .js container with 'cp_head' id
<asp:Content ContentPlaceHolderId="cp_head" runat="server">
<script type="text/javascript" src="/umbraco_client/ui/jquery.js">script>
<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.validate/1.5.5/jquery.validate.min.js">script>
asp:Content>
while in the 'Starterkit master' page (alias umbMaster) id of the corresponding element is: HeadContent , changing the first line above to:
<asp:Content ContentPlaceHolderId="HeadContent" runat="server">
solves the mismatching.
You can check the source code of the 'Company blog post' to see all these .js go into the same place.
is working on a reply...