How do I? – Work around the BUG where Site Columns for a custom Site Content Type do not show up as field controls in SharePoint Designer when customizing the Page Layout

Written by Cornelius J. van Dyk on . Posted in How Do I...

OK, a very long description for a problem that I ran into when adding new Page Layouts for Custom Content Types via the SharePoint UI. The problem is that Site Columns do not become available for you when you try to customize the Page Layout with SharePoint Designer, if it was added via the UI. Here’s the steps to recreate and work around the issue:

  1. Create a new Site Column.
  2. Create a new Site Content Type.
  3. Make the new Content Type available.
  4. Create the new Page Layout for the new Site Content Type.
    1. Navigate to SA/SS/MASS.

    2. Under the Galleries section, click the “Master pages and page layouts” link.

    3. Drop down the New menu in the menu bar.
    4. Click the “Page Layout” option on the popup menu.

    5. The Content Type Group should default to “Page Layout Content Types”. If it does not, set it to this value as we created the new Content Type as a child of Page Layouts.
    6. Drop down the Content Type Name and select your new Content Type, in our example it is “TestContentType”.
    7. In the URL Name field, enter the URL you wish to use for the Page Layout.
    8. In the Title field, enter the Title you wish to use for the Page Layout.

    9. Click the “OK” button to add the new Page Layout.
    10. The new Page Layout should now show up in the list.

  5. Edit the new Page Layout in SharePoint Designer.
    1. Open SPD and open your portal.
    2. In the Folder List, expand the web site item.
    3. Expand the “_catalogs” item.
    4. Expand the “masterpage” item.

    5. Locate your new Page Layout file. It should already be checked out since we just created it and SharePoint by default would create the new file in checked out mode. You can tell that it’s checked out by the green check mark (
      ) before the file name.

    6. We now want to add some Site Columns to our new Page Layout. If you look at the code view window of the Page Layout, we’d want to add these fields inside the “PlaceHolderMain” content tag between lines 6 and 7.
    7. After positioning the curser at the beginning of line 6, we want to add a Content Field.
    8. In the Toolbox toolbar/pane, scroll all the way down to the bottom of the list and locate the Content Fields section.
    9. BUG: We do not get any fields that we can add in this section. Instead, we get an error message stating “An error occurred while downloading the Toolbox information.”

    10. If you click the “Refresh” link, you are just presented with an error dialog window stating “The server could not complete your request. Contact your Internet service provider or Web server administrator to make sure that the server has the FrontPage Server Extensions or SharePoint Services installed.”

    11. At this point you’re thinking that just maybe you need to publish the new Page Layout before it becomes available.
    12. So we right click the Page Layout file in the Folder List and click “Check In” in the drop down menu.

    13. We then select the “Publish a major version” option and click “OK” to publish the new Page Layout.

    14. You’ll now be presented with an error message stating “Cannot perform this operation. The file is no longer checked out or has been deleted.”

    15. Basically, there is no way to get valid Page Fields to be available to this Page Layout because it was added via the UI. In order to work around this BUG, we need to add the Page Layout from SPD Go ahead and delete the Page Layout by right clicking on it and selecting “Delete” on the popup menu.
  6. Add the Page Layout from SharePoint Designer.
    1. If you have not done so ensure that the Page Layout file does not already exists and then open SPD and open your portal.
    2. In the Folder List, expand the web site item.
    3. Expand the “_catalogs” item.
    4. Expand the “masterpage” item.

    5. Right click the “masterpage” folder.
    6. On the popup menu, hover over the “New” option until it expands a second level popup.
    7. On the second level popup menu, click the “SharePoint Content” option.

    8. On the New dialog window, Select the “SharePoint Publishing” option.
    9. In the 2nd column, select the “Page Layout” option, if it is not already selected by default.
    10. Leave the Content Type Group set to “Page Layout Content Types”.
    11. Drop down the Content Type Name dropdown list and select your new Content Type, “TestContentType” in our example.
    12. In the URL Name field, enter the URL value you wish to use for this Page Layout. In our example, we’re using “TestPageLayout”.
    13. In the Title field, enter the Title you wish to use for this Page Layout.

    14. Click the “OK” button to add the Page Layout.
    15. SPD will load a new instance of itself and load the new Page Layout in edit mode for you. If you now look at the Content Fields and Page Fields sections in the Toolbox tool pane, you’ll notice that the fields are now available for you to add to you Page Layout.



Tags: , ,

Trackback from your site.

Cornelius J. van Dyk

Born and raised in South Africa during the 70's I got my start in computers when a game on my Sinclair ZX Spectrum crashed, revealing it's BASIC source code. The ZX had a whopping 48K of memory which was considered to be a lot in the Commodore Vic20 era, but more importantly, it had BASIC built into the soft touch keyboard. Teaching myself to program, I coded my first commercial program at age 15.

After graduating high school at 17, I joined the South African Air Force, graduating the Academy and becoming a Pilot with the rank of First Lieutenant by age 20. After serving my country for six years, I made my way back into computer software.

Continuing my education, I graduated Suma Cum Laude from the Computer Training Institute before joining First National Bank where my work won the Smithsonian Award for Technological Innovation in the field of Banking and Insurance. Soon I met Will Coleman from Amdahl SA, who introduced me to a little known programming language named Huron/ObjectStar. As fate would have it, this unknown language and Y2K brought me to the USA in 1998.

I got involved with SharePoint after playing around with the Beta for SharePoint Portal Server 2003. Leaving my career at Rexnord to become a consultant in 2004, I was first awarded the Microsoft Most Valuable Professional Award for SharePoint in 2005, becoming only the 9th MVP for WSS at the time. I fulfilled a life long dream by pledging allegiance to the Flag as a US citizen in 2006. I met the love of my life and became a private consultant in 2008. I was honored to receive my ninth MVP award for SharePoint Server in 2013.

Leave a comment

You must be logged in to post a comment.