10

So I have a webpart that I have put into a webpart zone, when it is in the webpart zone it does not show but when I put it outside the zone it appears, what am I doing wrong?

Code below:

<WebPartPages:WebPartZone id="MiddleRightBottom" runat="server" title="MiddleRightBottom">
<ZoneTemplate>
<WebPartPages:ContentEditorWebPart webpart="true" runat="server" __WebPartId="{C43B284D-E14C-4968-89E7-75B15289BCA2}">
<WebPart xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/WebPart/v2"><Title>List</Title>
  <FrameType>None</FrameType>
  <Description />
  <IsIncluded>true</IsIncluded>
  <PartOrder>2</PartOrder>
  <FrameState>Normal</FrameState>
  <Height />
  <Width />
  <AllowRemove>true</AllowRemove>
  <AllowZoneChange>true</AllowZoneChange>
  <AllowMinimize>true</AllowMinimize>
  <AllowConnect>true</AllowConnect>
  <AllowEdit>true</AllowEdit>
  <AllowHide>true</AllowHide>
  <IsVisible>true</IsVisible>
  <DetailLink />
  <HelpLink />
  <HelpMode>Modeless</HelpMode>
  <Dir>Default</Dir>
  <PartImageSmall />
  <MissingAssembly>Cannot import this Web Part.</MissingAssembly>
  <PartImageLarge>/_layouts/images/mscontl.gif</PartImageLarge>
  <IsIncludedFilter />
  <ExportControlledProperties>true</ExportControlledProperties>
  <ConnectionID>00000000-0000-0000-0000-000000000000</ConnectionID>
  <ID>g_1803f384_c368_4e7b_a6ee_89f6e439aa66</ID>
  <Content xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor"><![CDATA[<div id="HowDoIsection" class="HowDoI-section">​test</div>]]></Content>
  <ContentLink xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor" />
  <PartStorage xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor" />
</WebPart>


</WebPartPages:ContentEditorWebPart>


</ZoneTemplate>
</WebPartPages:WebPartZone>
  • If you are using SPD, are you editing in advanced mode? – Mike Apr 5 '16 at 15:09
  • I am using advanced mode – test Apr 5 '16 at 15:18
  • 1
    It shows up just fine. You don't have any content with the div tag. It's basically an empty div. Use firebug or IE tools to see if the HowDoISection div exist in DOM – Aveenav Apr 5 '16 at 16:14
  • It should be there in the browser, user browser F12 developer tools to check. That would give an idea on the content of the webpart. As said by @Aveenav, if a DIV has nothing inside it, it wont show up. Also check if any of the parent containers are having CSS properties that hide it. – Anand Jan 4 '18 at 22:41
0

Verify that the page template you're using actually shows the "MiddleRightBottom" webpart zone. Different page templates show different zones, but if you change from one template to another, it shuffles things around.

To do this, edit the page, go to the Page settings, and try changing between page templates to see if it shows up on any of them. If it does, figure out which zone you should be putting the webpart in based on your original template.

0

Open the page in SharePoint designer and you can see the web part zone and delete the details from the page and save.

Make sure you take first one backup copy before you are editing in SharePoint designer.

0

If you are using custom CSS, it might be worth traversing the tree of that webpart zone/webpart in Chrome Dev Tools (f12) to make sure there isn't some stray CSS selector/property hiding anything inside your webpart zone.

This has bit me in the past a lots of our styling has been reused from back on SP2007. Dev tools are my go-to when things don't show up correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.