Answered Pages not picking up updated layout

  • 27 เมษายน 2555 22:29
     
     

    Hi Everyone,

    We cannot get existing pages to pick up the changes made to their page layout.  We added two new fields to a content type which are then deployed using a feature upgrading feature receiver.  This also necessitated the update of a page layout that displays the new fields.  This page layout uses the updated content type.

    The content type updated with no problems.  All objects that use the content type now show the two new fields.  Selecting "view properties" on a page that uses the affected page layout also shows the two new fields.  However, selecting "edit" does not show the two new fields; the layout uses an editmodepanel to display the fields.

    We confirmed the following:

    - page layout and pages that use it are not customized/unghosted (checked using Gary LaPointe's tools)

    - page layout and pages have not been edited using SPD (SPD editing is disabled and we don't use SPD)

    - page layout is updated (confirmed using master page gallery)

    - changes are not reflected even when the page layout is swapped with a second, different page layout (which uses the same content type)

    We are totally stumped.  Any help will be greated appreciated.

    WM

ตอบทั้งหมด

  • 28 เมษายน 2555 4:35
     
     

    Hello WM123,

    1.) Please check the ShowInEditForm Property of the fields.

    2.) Please check the FieldName property in EditModePanel in Pagelayout. Are they correct? bec if the  FieldName is not an InternalName of the Field the it will not render the field control.

    3.) Please check with putting some OOTB field of the Page in Page layout and verify.

    Hope this helps.

    Thanks,

    Saumil Thakkar

  • 28 เมษายน 2555 7:48
     
     
    Saumi@ thanks for giving these suggestion. Its a very useful for me.
  • 30 เมษายน 2555 20:59
     
     

    Hi Saumil,

    Thank you very much for your suggestions.  They were helpful in troubleshooting the problem. 

    I added the ShowInEditForm property and it didn't make a difference.  I even used the SharePoint Manager tool to double check the fieldname but didn't find any issues.  I was able to get OOTB fields to show up properly in the editmodepanel.

    I decided to try referencing the fields by the GUID in the layout and it worked!  Would you be able to explain what's happening?  I'd prefer not to use GUIDs in the editmodepanel if possible.

    One additional thing that I didn't mention before is that everything worked perfectly on a brand new site.  The problem only affected existing sites.

    thanks again,

    WM

  • 3 พฤษภาคม 2555 5:25
     
     

    Hello WM,

    I added the ShowInEditForm property and it didn't make a difference.  I even used the SharePoint Manager tool to double check the fieldname but didn't find any issues.  I was able to get OOTB fields to show up properly in the editmodepanel. --- OK

    I decided to try referencing the fields by the GUID in the layout and it worked!  Would you be able to explain what's happening?  I'd prefer not to use GUIDs in the editmodepanel if possible. -- It seems very strange for me because I have never used GUID in the Page layout. I was able to achive this only by Field Name till now. Please verify that field names are correct or not.

    One additional thing that I didn't mention before is that everything worked perfectly on a brand new site.  The problem only affected existing sites. -- For the site which have contenttypes are already in use will not have the effect of changes in the contenttype. you have to go to Site columns and Content Types in the site settings and select the option of Update all lists using this field or contenttype and it will propagate your changes to the list level.

    So whenever you add/change your field in Page layout please check for the same in the contenttype in the list/library.

    Thanks

    Saumil Thakkar

    • ทำเครื่องหมายเป็นคำตอบโดย Shimin Huang 4 พฤษภาคม 2555 7:57
    • ยกเลิกการทำเครื่องหมายเป็นคำตอบโดย WM123 4 พฤษภาคม 2555 16:49
    •  
  • 4 พฤษภาคม 2555 17:11
     
     คำตอบ

    Jeff Lin from Microsoft has been very helpful to uncover the cause of this.  He indicated he had not used GUIDs in layouts as well.  What he found was that the InternalNames of the affected fields within the page layout somehow are different from the StaticNames (the fields at the site level have the same InternalName as the StaticName).  The InternalNames seem to be generated using the Display Names.  Apparently when SharePoint can't find a match with the field name, it falls back to the GUID, which it finds.  The question is how does SharePoint generate the InternalName.  Why is the InternalName for the affected fields different?  I'll update this thread when I find out more.

    • ทำเครื่องหมายเป็นคำตอบโดย WM123 4 พฤษภาคม 2555 17:13
    •