Home > Master Pages, sharepoint > Custom application.master – working around Microsoft bugs

Custom application.master – working around Microsoft bugs

I created a very customized application.master page and I followed all the best practices I could find. I had all the right content place holders and I did not implement the search control on it. These were the two basic recommendations I could find from other people in the SharePoint field.

So, the new application.master was created and everything seemed to be working fine. Then one day we went to check in a file and noticed that we couldn’t check in. The check in page had a “title” and a “description” but everything under it was blank. I did a view source on the page and the html for the check in page was actually there, it just wasn’t showing.

At this point I was baffled. So, I decided to go look at the checkin.aspx page that SharePoint actually uses. While on this page I concentrated on the “Description” section because that was the last section that actually showed up. When I looked at the jumbled mess that Microsoft calls html it seemed to look fine (except for their inconsistent use of capitalization and tabbing – that drives me crazy :)).

So, I formatted the html a little better and I noticed something very interesting:

Now, take a close look. I always thought you had to close your td’s before closing your trs’s. This is what Microsoft gets for writing this jumbled html.

The only thing I can’t figure out is how they managed to get their application.master pages to work. There are two possiblities in my mind (but there might be others, I am just guessing here):
1. There is bad html in the regular application.master page which somehow closes the tags off.
2. Quirk mode – SharePoint runs in Quirk mode. Quirk mode is basically a way to keep non-standard html pages to render correctly. It tries to “fix” certain errors automatically. However, it has issues because every browser fixes “quirks” differently. Thus, it is never a good thing to rely on this to fix issues.

So, this is no good if you write clean html in your custom application.master page, because it is actually the Microsoft implementing page that has the error in it.

My solution to fixing this was to place the PlaceHolderPageDescription in a hidden panel on my application.master. Now, this means I will never get these descriptions in my application pages, but that is something I am willing to live with.

Advertisements
Categories: Master Pages, sharepoint
  1. November 2, 2008 at 7:21 am

    nice post
    very helpful

  2. November 16, 2009 at 3:16 pm

    Another nightmare. I could not fix the problem with your suggestion.

    Just before having huge project meeting I went through all important requirements.

    I started from scratch with a sharepoint application master and recreated my custom changes in the header and other areas.

    Thanks for post but didn’t help me a took me 90 minutes to fix my problem.

  1. August 1, 2008 at 12:53 am
  2. November 6, 2009 at 8:44 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: