none
SharePoint 2013 Publishing Layout - Missing items on save

    Question

  • Hi,

     I have a strange issue with a SharePoint 2013 layout page. We have some fields (mainly multi plain text and image fields) that are available in edit mode ... disappear when the publishing page is saved .. then re appear when the item is checked in and or published.

     We have a solution for the issue where we declare the fields twice, once in edit mode followed by the read mode deceleration but surly this should not be necessary?

    e.g

    This works:

    <PublishingWebControls:EditModePanel runat=server id="EditModePanelA" PageDisplayMode="Display">
       <SharePoint:FieldValue runat="server" id="ImageFieldValue" FieldName="ImageField1"/>
    </PublishingWebControls:EditModePanel>
    <PublishingWebControls:EditModePanel ID="EditModePanel2" runat="server">
       <PublishingWebControls:RichImageField ID="RichImageField4" FieldName="ImageField1" runat="server" />
    </PublishingWebControls:EditModePanel>

    This does not:

       <PublishingWebControls:RichImageField ID="RichImageField4" FieldName="ImageField1" runat="server" />

    any ideas?


    Thanks Chris

    Saturday, August 31, 2013 10:57 PM

All replies

  • Hi chris,

    The fields should need to be input in both "Display" and "Edit" mode of EditModePanel per the following article, you can take a look.

    <PublishingWebControls:EditModePanel runat=server id="EditModePanelA" PageDisplayMode="Display">
       <SharePoint:FieldValue runat="server" id="ImageFieldValue" FieldName="ImageField1"/>
       <PublishingWebControls:RichImageField ID="RichImageField4" FieldName="ImageField1" runat="server" />
    </PublishingWebControls:EditModePanel>
    <PublishingWebControls:EditModePanel ID="EditModePanel2" runat="server" PageDisplayMode="Edit">
       <SharePoint:FieldValue runat="server" id="ImageFieldValue" FieldName="ImageField1"/>
       <PublishingWebControls:RichImageField ID="RichImageField4" FieldName="ImageField1" runat="server" />
    </PublishingWebControls:EditModePanel>

    http://blogs.msdn.com/b/kaevans/archive/2011/04/02/page-layouts-in-sharepoint.aspx

    Thanks


    Daniel Yang
    TechNet Community Support

    • Marked as answer by chris_walker Sunday, September 08, 2013 12:25 PM
    • Unmarked as answer by chris_walker Tuesday, September 17, 2013 12:25 AM
    Thursday, September 05, 2013 11:12 AM
    Moderator
  • Hi,

     Yes well that is exactly what we have done, however how come the built in ArticleLeft.aspx can do this:

    <asp:Content ContentPlaceholderID="PlaceHolderMain" runat="server">
    	<div class="article article-left">
    		<PublishingWebControls:EditModePanel runat="server" CssClass="edit-mode-panel title-edit">
    			<SharePointWebControls:TextField runat="server" FieldName="Title"/>
    		</PublishingWebControls:EditModePanel>
    		<div class="captioned-image">
    			<div class="image">
    				<PublishingWebControls:RichImageField FieldName="PublishingPageImage" runat="server"/>
    			</div>
    			<div class="caption">
    				<PublishingWebControls:RichHtmlField FieldName="PublishingImageCaption"  AllowTextMarkup="false" AllowTables="false" AllowLists="false" AllowHeadings="false" AllowStyles="false" AllowFontColorsMenu="false" AllowParagraphFormatting="false" AllowFonts="false" PreviewValueSize="Small" AllowInsert="false" AllowEmbedding="false" AllowDragDrop="false" runat="server"/>
    			</div>
    		</div>
    		<div class="article-header">
    			<div class="date-line">
    				<SharePointWebControls:DateTimeField FieldName="ArticleStartDate" runat="server"/>
    			</div>
    			<div class="by-line">
    				<SharePointWebControls:TextField FieldName="ArticleByLine" runat="server"/>
    			</div>
    		</div>
    		<div class="article-content">
    			<PublishingWebControls:RichHtmlField FieldName="PublishingPageContent" HasInitialFocus="True" MinimumEditHeight="400px" runat="server"/>
    		</div>
    		<PublishingWebControls:EditModePanel runat="server" CssClass="edit-mode-panel roll-up">
    			<PublishingWebControls:RichImageField FieldName="PublishingRollupImage" AllowHyperLinks="false" runat="server" />
    			<asp:Label text="<%$Resources:cms,Article_rollup_image_text15%>" CssClass="ms-textSmall" runat="server" />
    		</PublishingWebControls:EditModePanel>
    	</div>
    </asp:Content>
    

    In this case there is no need to show the image in Edit and Display mode, it is just declared once. It makes me think that there is something wrong with the way we have declared the site columns or content type as the built in one works.

    Interestingly though if we add the built in field "PublishingPageImage" to out layout we get the same issue (only showing in edit mode).

    Never mind thank you for your response. I guess I can give you the points :)

    Thanks

    Chris


    Thanks Chris

    Sunday, September 08, 2013 12:25 PM
  • Further on this ...

    I am still having issues with fields going missing in my publishing pages.

    I have resorted to going back to something very simple:

    <asp:Content runat="server" ContentPlaceHolderID="PlaceHolderMain">
                <PublishingWebControls:EditModePanel runat="server" PageDisplayMode="Display">
                    1. <SharePointWebControls:FieldValue ID="FirstPublished" FieldName="FirstPublished" runat="server" Visible="True" />
                </PublishingWebControls:EditModePanel>
                    <br />
                <PublishingWebControls:EditModePanel runat="server" PageDisplayMode="Display">
                    2. <SharePointWebControls:FieldValue ID="FieldValue2" FieldName="LastPublished" runat="server"/>
                    <br/>
                </PublishingWebControls:EditModePanel>
                    3. <SharePointWebControls:NoteField ID="AltSummary" FieldName="AltSummary" runat="server"/>
                    <br/>
                    4. <SharePointWebControls:NoteField ID="Image1Caption" FieldName="Image1Caption" runat="server"/>
                    <br/>
                    5. <SharePointWebControls:NoteField ID="Image2Caption" FieldName="Image2Caption" runat="server"/>
                    <br/>
                    6. <SharePointWebControls:NoteField ID="Image3Caption" FieldName="Image3Caption" runat="server"/>
                    <br/>
                    <PublishingWebControls:EditModePanel runat="server">
                        7. <Taxonomy:TaxonomyFieldControl ID="Navigation" FieldName="Navigation" runat="server" />
                    </PublishingWebControls:EditModePanel>
                    <br/>
                    8. <PublishingWebControls:RichImageField ID="ArticleImage1" FieldName="ArticleImage1" runat="server"/>
                    <br/>
                    9. <PublishingWebControls:RichImageField ID="ArticleImage2" FieldName="ArticleImage2" runat="server"/>
                    <br/>
                    10. <PublishingWebControls:RichImageField ID="ArticleImage3" FieldName="ArticleImage3" runat="server"/>
                    <br/>
                    11. <PublishingWebControls:RichHtmlField ID="RichHtmlField1" FieldName="MainBody1" runat="server"/>
                    <br/>
                    12. <PublishingWebControls:RichHtmlField ID="RichHtmlField2" FieldName="MainBody2" runat="server"/>
                    <br/>
                    13. <PublishingWebControls:RichHtmlField ID="RichHtmlField3" FieldName="MainBody3" runat="server"/>
                <!-- end page -->
            </asp:Content>

    One thing i have noticed is that if i add one item to the taxonomy field all is well. If i add a second item to the taxonomy field then subsiquent fields go missing.

    It looks as if it is an issue with the taxonomy field (multi)

    If there is no or one item in the taxonomy field then the other fields on the page display as expected. If there are more than one item added to the field then lots of other fields go missing.


    Thanks Chris

    Tuesday, September 17, 2013 12:25 AM
  • Just to verify:

    This only happens when you press "Save" if you press check in then the page performs as normal :( our clients need the save functionality to work correctly.


    Thanks Chris

    Tuesday, September 17, 2013 8:09 AM
  • Same problem here.  For me, it was happening to the built-in Author field.  The ControlMode was set to Display and it showed up just fine in edit mode.  On display mode, it is blank until the page is checked in.
    Sunday, November 24, 2013 9:39 AM
  • Hi Alan,

     Which service pack do you have installed? We found that most of our issues were resolved with the August CU.

    Thanks

    Chris


    Thanks Chris

    Tuesday, November 26, 2013 11:01 PM
  • Hi Guys,

    I got the similar issue.

    I'm developing on Office 365 SP 2013.

    I created a custom page layout inherit 'Page' content type with some custom fields.

    All the custom fields working fine.

    The problem is the 'PublishingPageImage' field. And I look into my custom page content type, that the 'PublishingPageImage' is not included. So I add the 'PublishingPageImage' Field to the page content type and 'edit' and 'publish' all the pages and the field now work properly.

    So if you are adding the 'taxonomy field' only into the library but not the page content type, you may have the same issue?

    I hope this information could help.

    Friday, November 29, 2013 12:45 AM