Could not find suitable place holder for required control.

Posted by Community Admin on 04-Aug-2018 22:36

Could not find suitable place holder for required control.

All Replies

Posted by Community Admin on 18-Jul-2013 00:00

Hi there,

I have setup about 15 different template all with their own master pages.

Everything was working fine until I all sudden started getting 500 responses (from IIS 8.0).

The message on the screen says (stack dump):

Could not find suitable place holder for required control.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.InvalidOperationException: Could not find suitable place holder for required control.

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: 

[InvalidOperationException: Could not find suitable place holder for required control.]
Telerik.Sitefinity.Abstractions.VirtualPath.PageResolverBase.BuildControls(PageData pageData, List`1 controlConatiners, CursorCollection placeHolders, DirectiveCollection directives) +3031
Telerik.Sitefinity.Abstractions.VirtualPath.SitefinityPageResolver.RenderPage(StringBuilder output, PageData pageData, RequestContext context, String virtualPath) +444
Telerik.Sitefinity.Abstractions.VirtualPath.SitefinityPageResolver.Open(PathDefinition definition, String virtualPath) +1481
Telerik.Sitefinity.Abstractions.VirtualPath.VirtualPathManager.OpenFile(String virtualPath) +231
System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) +256
System.Web.UI.TemplateParser.Parse() +12416938
System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() +135
System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) +189
System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() +265
System.Web.Compilation.BuildProvidersCompiler.PerformBuild() +21
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +580
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) +571
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) +203
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) +249
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) +56
Telerik.Sitefinity.Web.PageRouteHandler.BuildHttpHandler(RequestContext requestContext) +666
System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) +12673575
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18045

I have tired to remove parts of my page to pinpoint what is happening to no avail. I have also deleted the page and recreated them. I have also cleaned the project to make sure all of the dlls were rebuilding correctly.

The pages are still showing fine in the backend but it is just dead in the frontend, and as there is no way I can debug your assemblies I am quite stuck.

Can anyone please advice on a solution?
Also wouldn't it be great if there error message told you what the suitable place holder and the required control is?

Posted by Community Admin on 23-Jul-2013 00:00

Hi Magnus,

 I already responded to your ticket, but I'll respond here, as well, for someone who may be encountering the same issue. The problem is that you need to have at least one ContentPlaceholder in your master page.

Regards,
Jen Peleva
Telerik
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 14-Oct-2013 00:00

  Hello ! I am receiving the exact same error when I try to use pure MVC mode with a template loaded from a master page. There definitely is a content-placeholder on the master page and it actually works in page preview ... once the page is published though it will fail with the "Could not find suitable place holder for required control." error.

Posted by Community Admin on 15-Oct-2013 00:00

Hi Florina,

The problem may be coming from a ContentPlaceHolder in the head tag of your templates. So if you have such contentPlaceholder:

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <asp:ContentPlaceHolder ID="head" runat="server"></asp:ContentPlaceHolder>
</asp:Content>
change it to 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>

Regards,
Jen Peleva
Telerik
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 15-Oct-2013 00:00

    Hi Jen,
Thank you for your reply. I double checked and this is not the case. I was having the issue with a more complex master page so I went ahead and tried to make sure it is not related to the master page markup . Currently I am getting that error with this very simple master page :

<%@ Master Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3.org/.../xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title></title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
</head>
<body class="main-body">
    <form id="form1" runat="server">
        <div id="wrapper">
            <div id="header">
                <asp:contentplaceholder id="headerPlaceholder" runat="server"/>
            </div>
            <div id="content">
                <asp:contentplaceholder id="contentPlaceholder" runat="server"/>
            </div>
            <div id="footer">
                <asp:contentplaceholder id="footerPlaceholder" runat="server" />
            </div>
        </div>
   </form>
</body>
</html>

Posted by Community Admin on 18-Oct-2013 00:00

Hello Florina,

 There is nothing wrong with the code you have provided which makes me believe the issue lies either in your code-behind or in some Scripts running on the page. Try to isolate the reason by removing scripts and widgets from the page one by one and debug the events of your template's code-behind(if any). Additionally I can recommend opening a support ticket so we can resolve the problem in a timely manner.

Regards,
Ivan D. Dimitrov
Telerik
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 18-Oct-2013 00:00

There are absolutely no scripts or widgets on the page Ivan. I am fairly certain this is a Sitefinity bug with MVC pure more.

Posted by Community Admin on 18-Oct-2013 00:00

I have no idea why I added the more word . Disregard it .

Posted by Community Admin on 23-Oct-2013 00:00

Hi Florina,

 It seems to me that you did not properly resolved your pure MVC template. Detailed information on how to do that can be found here.

Regards,
Ivan D. Dimitrov
Telerik
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 10-Feb-2014 00:00

Hi


"Could not find suitable place holder for required control." error i am getting

and here is the code

<body>
    <form id="form1" runat="server">
        <asp:contentplaceholder id="Header" runat="server" />
<div class="row header">
  <div class="large-12 columns">
    <div class="row">
      <div class="large-4 medium-4 columns">
        <h1><a href="index.html"><img id="Img1" src="~/image/logo.png" runat="server" alt="Trinity Highway"></a></h1>
      </div>
      <div class="large-8 medium-8 columns">
        <ul class="topmenu">
          <li>United States (English)<a href="#">Change Language </a></li>
          <li>Need Help?<a href="#">Contact Us</a></li>
        </ul>
        <div class="clearfix"></div>
        
          <input type="text"/>
          <input type="submit" value="" />
       
      </div>
    </div>
    <div class="row main-menu">
      <div class="large-12 columns">
        <nav id="cbp-hrmenu" class="cbp-hrmenu">
          <ul>
            <li> <a href="#">ABOUT US</a>
              <div class="about-dropdown">
                <ul>
                  <li><a href="#">Who We Are</a></li>
                  <li><a href="#">Our History</a></li>
                  <li><a href="#">Associations & Accolades</a></li>
                  <li><a href="#">News & Events</a></li>
                  <li><a href="#">Corporate</a></li>
                </ul>
              </div>
            </li>
            <li> <a href="#">PRODUCTS </a>
              <div class="cbp-hrsub products">
                <div class="cbp-hrsub-inner">
                  <div>
                    <h4>BARRICADES</h4>
                    <ul>
                      <li><a href="#">Plastic Barricades</a></li>
                      <li><a href="#">Low-Profile Barricades</a></li>
                      <li><a href="#">Accessories </a></li>
                    </ul>
                    <h4>BARRIERS</h4>
                    <ul>
                      <li><a href="#">Cable Barriers </a></li>
                      <li><a href="#">Cable Barrier Terminals</a></li>
                      <li><a href="#">Steel Barriers</a></li>
                      <li><a href="#">Water Filled Barriers</a></li>
                    </ul>
                  </div>
                  <div>
                    <h4>CRASH CUSHIONS</h4>
                    <ul>
                      <li><a href="#">QuadGuard Family</a></li>
                      <li><a href="#">TRACC Family</a></li>
                      <li><a href="#">REACT Family</a></li>
                      <li><a href="#">QUEST Family</a></li>
                      <li><a href="#">SAND BARRELS</a></li>
                      <li><a href="#">NEAT Family</a></li>
                      <li><a href="#">Other</a></li>
                    </ul>
                  </div>
                  <div>
                    <h4>DELINEATORS</h4>
                    <ul>
                      <li><a href="#">Standard</a></li>
                      <li><a href="#">High Performance</a></li>
                      <li><a href="#">Base Options & Tools</a></li>
                      <li><a href="#">Adhesives & Anchors </a></li>
                      <li><a href="#">Reflective Sheeting </a></li>
                    </ul>
                    <h4>END TERMINALS</h4>
                    <ul>
                      <li><a href="#">Tangent</a></li>
                      <li><a href="#">Median</a></li>
                      <li><a href="#">Flared</a></li>
                      <li><a href="#">Post Options</a></li>
                    </ul>
                  </div>
                  <div>
                    <h4>GATES</h4>
                    <ul class="gates-ul">
                      <li><a href="#">All Products</a></li>
                    </ul>
                    <h4>GUARDRAIL</h4>
                    <ul>
                      <li><a href="#">Trinity Highway Guardrail</a></li>
                      <li><a href="#">Nucor Guardrail</a></li>
                      <li><a href="#">Post & Block Options</a></li>
                    </ul>
                  </div>
                  <div>
                    <article>
                      <h4>SIGN POSTS</h4>
                      <ul class="signpost">
                        <li><a href="#">Steel Sign Supports</a></li>
                        <li><a href="#">Plastic Sign Posts </a></li>
                      </ul>
                    </article>
                    <article>
                      <h4>SPECIALTY PRODUCTS </h4>
                      <ul class="specialty">
                        <li><a href="#">All Products</a></li>
                      </ul>
                    </article>
                    <article>
                      <h4>TMA’s</h4>
                      <ul>
                        <li><a href="#">All Products</a></li>
                      </ul>
                    </article>
                  </div>
                </div>
                <!-- /cbp-hrsub-inner -->
              </div>
              <!-- /cbp-hrsub -->
            </li>
            <li><a href="#">INDUSTRIES</a>
              <div class="cbp-hrsub industries">
                <div class="cbp-hrsub-inner">
                  <div>
                    <ul>
                      <li><a href="#">Highway & Toll Roads</a></li>
                      <li><a href="#">Traffic Control & Work Zone</a></li>
                      <li><a href="#">Construction</a></li>
                      <li><a href="#">Airports</a></li>
                      <li><a href="#">Specialty</a></li>
                      <li><a href="#">Flood Control</a></li>
                    </ul>
                  </div>
                  <div>
                    <ul>
                      <li><a href="#">Bike & Pedestrian</a></li>
                      <li><a href="#">Military/Security</a></li>
                      <li><a href="#">Municipal</a></li>
                      <li><a href="#">ADA Compliant</a></li>
                      <li><a href="#">Emergency Preparedness</a></li>
                      <li><a href="#">Parking</a></li>
                    </ul>
                  </div>
                  <div>
                    <ul>
                      <li><a href="#">Special Events & Crowd Control</a></li>
                      <li><a href="#">Industrial</a></li>
                      <li><a href="#">Recreational Facilities</a></li>
                      <li><a href="#">Flood Control</a></li>
                      <li><a href="#">Utilities</a></li>
                    </ul>
                  </div>
                </div>
                <!-- /cbp-hrsub-inner -->
              </div>
            </li>
            <li><a href="#">RESOURCES</a>
              <div class="about-dropdown resources">
                <ul>
                  <li><a href="#">Product Information</a></li>
                  <li><a href="#">Manuals</a></li>
                  <li><a href="#">Videos</a></li>
                </ul>
              </div>
            </li>
            <li><a href="#">RENTALS</a></li>
          </ul>
        </nav>
      </div>
    </div>
  </div>
</div>
<div class="row">
  <div class="large-12 columns nav-filter">
    <ul>
      <li><a href="#">ABOUT US</a></li>
    </ul>
  </div>
</div>
<div class="row">
  <div class="large-12 columns page-title">
    <h2>WHO WE ARE</h2>
  </div>
</div>
<div class="row content-area">
  <div class="large-3 medium-4 columns">
      <div class="subsection">
    <ul>
    <li><a href="#" class="active">WHO WE ARE</a></li>
    <li><a href="#">OUR HISTORY</a></li>
    <li><a href="#">ASSOCIATIONS</a></li>
    <li><a href="#">NEWS</a></li>
    <li><a href="#">EVENTS</a></li>
    <li><a href="#">CORPORATE</a></li>
    </ul>
    </div>
   </div>
  <div class="large-9 medium-8 columns">
 
    <dl class="accordion whoweare-tab" data-accordion>
    
      <dd> <a href="#panel1" id="first_panel">We Are Trinity Highway</a>
        <div id="panel1" class="content whoweare active">
         <h3 class="fi-quote">We are Trinity Highway</h3>
          <img src="~/image/who-we-are-map.png" runat="server" alt="">
        </div>
      </dd>
      
      <dd> <a href="#panel2">Mission</a>
        <div id="panel2" class="content">
        <h3>Our Mission Is Your Mission</h3>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.Upon frontal impacts within NCHRP criteria, the TREND™ 350 Median absorbs energy by creating friction between the guardrail panels and defomation of the rail sections as they slide rearward over the adjoining panels. During impacts, the yielding posts laterally support the rail sections, smoothly redirecting the vehicle.</p>
        </div>
      </dd>
      <dd> <a href="#panel3">Vision</a>
        <div id="panel3" class="content">
        <h3>Our Vision</h3>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.Upon frontal impacts within NCHRP criteria, the TREND™ 350 Median absorbs energy by creating friction between the guardrail panels and defomation of the rail sections as they slide rearward over the adjoining panels. During impacts, the yielding posts laterally support the rail sections, smoothly redirecting the vehicle.</p></div>
      </dd>
      <dd> <a href="#panel4">Commitment</a>
        <div id="panel4" class="content">
        <h3>Our Commitment</h3>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.Upon frontal impacts within NCHRP criteria, the TREND™ 350 Median absorbs energy by creating friction between the guardrail panels and defomation of the rail sections as they slide rearward over the adjoining panels. During impacts, the yielding posts laterally support the rail sections, smoothly redirecting the vehicle.</p></div>
      </dd>
      <dd> <a href="#panel5">Brands</a>
        <div id="panel5" class="content">
            <h3>Our Brands</h3>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.Upon frontal impacts within NCHRP criteria, the TREND™ 350 Median absorbs energy by creating friction between the guardrail panels and defomation of the rail sections as they slide rearward over the adjoining panels. During impacts, the yielding posts laterally support the rail sections, smoothly redirecting the vehicle.</p>
        </div>
      </dd>
    </dl>
    
  </div>
</div>
<div class="row footer">
  <div class="large-5 medium-5 columns ftr-left">
    <ul>
      <li><a href="#">PATENTS</a></li>
      <li><a href="#">RIVACY</a></li>
      <li><a href="#">TERMS & CONDITIONS</a></li>
    </ul>
    <p>© Copyright 2014 Trinity Industries LTD</p>
  </div>
  <div class="large-7 medium-7 columns ftr-right">
    <ul>
      <li><a href="#">Events<i></i></a></li>
      <li><a href="#">Login<i></i></a></li>
      <li><a href="#">Join Our Newsletter<i></i></a></li>
    </ul>
  </div>
</div>
<div class="row">
  <div class="large-12 columns partners"> <img src="~/image/partners-img.jpg" runat="server" alt=""> </div>
</div>
        </form>
</body>

could u please help me out of this error
   

This thread is closed