Problems with SharePoint Designer

Search

Accessible SharePoint WebSites
Download ARF

Problems with SharePoint Designer

http://blog.thekid.me.uk

For the second time in as many weeks I have had the same problem with SharePoint designer and the problem has occurred in at least two separate projects.

The first time I saw the problem it was in a master page and I put it down to a bug in SharePoint Designer, caused by complex HTML. The second time however uses fairly basic HTML and is causing problems with development.

So what is the problem?

Basically SharePoint designer is reformatting the HTML, even though I am working in code view. Everytime I ’save’ or ‘open’ an .ASPX layout, SP Designer decides it wants to change the HTML I have just typed in. This is a public website with graphic designer created HTML which needs to be re-produced exactly.

The latest example is when entering a <h2> tag…SharePoint designer decides to remove the closing </h2>, which in turn ruins the layout of the page. Annoying, but you see the effect immediately and can resolve it. However on another project it was removing a </div>, which was not immediately apparent and only showed up in certain situations. To get around the problem you need to add two tags (in my case </h2></h2>) and SP Designer will only remove one of them.

To compound it further, when you open the file up again SharePoint Designer will again re-format the HTML…this time differently, removing the closing tag and adding some   to the HTML.

Within a large, complicated, master page a closing tag being removed may not be immediately noticed and so you should be aware it could be caused by SharePoint designer itself.

The solution? I don’t have one…I tried changing all the settings I could…none appeared to make a difference. This is just to make you aware this can happen and it’s not just a ’slip on the keyboard’.

I have a ‘poor quality’ animated gif (3Mb) if you want to see it happening.

spdesigner.gif

Posted by Vincent Rothwell on Sunday, 18 Feb 2007 20:52  - 32 Comments
Orininally printed from http://thekid.me.uk - Copyright Vincent Rothwell 2007
 

Comments

Sunday, 27 Jul 2008 10:36 by Harold
I'm having the same problems. Another anoying bug is the checkin/checkout bug. Person A checks a file out, makes some changes and checks the file in. My sharepoint designer somehow still says that the file is checkout by person A. Even after SP1 these bugs still occur. I don't understand why they don't fix these simple bugs. An option to disable reformating would be great and easy to implement...

Sunday, 27 Jul 2008 10:36 by Adrian
My conclusion is that SharePoint designer is just stupid. I was having a WHALE of a time with my own custom menu control that I wrote (to replace the CSS-unfriendly tables of the OOTB navigation...), using templates. On the master page, my control looks a bit like this: <DSRD:TestMenu id="TopNavigationMenu2" DataSourceID="topSiteMap" runat="server" > <HeaderTemplate><ul></HeaderTemplate> <FooterTemplate></ul></FooterTemplate> <ItemHeaderTemplate><li></ItemHeaderTemplate> <ItemTemplate><asp:HyperLink runat="server" NavigateUrl='<%#Eval("Url")%>' ToolTip='<%#Eval("Description")%>'><%# Eval("Text") %></asp:HyperLink></ItemTemplate> <ItemFooterTemplate></li></ItemFooterTemplate> </DSRD:TestMenu> Naturally, SPD doesn't know what an ITemplate is. So it sees the <ul> as having no closing tag (and the <li> also) and so it CLOSES THEM!!! This is very very annoying, and it doesn't happen every time I save, it appears to be random. Anyway, I have a solution for this problem: don't use SPD. If you want to edit your master page's code directly without it being tampered with, use Visual Studio. This can be achieved quite simply, by pointing your windows explorer at your sharepoint site (in my case http://adriandev/ [i have 'adriandev' added in my hosts file and that is the host header for my sharepoint site]). Windows explorer will list the contents of the sharepoint site, just like SPD, and you can navigate into /_catalogs/masterpage/ and open your master directly from there, with Visual Studio, Notepad, MS Word, whatever your text editor of choice. I think this is one of the coolest features of sharepoint, the "file system" access to the content. -Adrian

Sunday, 27 Jul 2008 10:36 by Steve Kwan
SharePoint Designer consistently loses my formatting and I find it absolutely infuriating. I'll try using the VS.NET workaround recommended by Adrian.

Sunday, 27 Jul 2008 10:36 by Davinder Singh
Hi, Im having major issues with SharePoint Designer for the last 3 days. Whenever I open a site, I cannot open any pages. I was able to about 3 days ago, then suddenly it just stopped. I've tried uninstalling Designer and reinstalling with the service pack. Has anyone experienced this problem? Many of my Team Members have no problem opening the same Site that im attempting to open so its looks like the problem is with just my SharePoint Designer. If I click "Open with Notepad" it will open it fine, however to open in HTML/Split or Text view - nothing. I've tried everything! If anyone can help please email me at d4vinder[AT]yahoo.co.uk Kindest Regards Davinder Singh (UK)

Sunday, 27 Jul 2008 10:36 by Rik
I'm having the same issue with H1 / H2 tags dissapearing upon saving any page layout, also sometimes a set of opening and closing body and html tags appear making the page render corrupt. So far there isn't any solution to my knowledge... i'm running a fully updated version of SPD on vista 32bit.

Sunday, 27 Jul 2008 10:36 by Vince
No I still have not found a solution, fortunately I'm not using SPD that much at the moment!! --Vince

Sunday, 27 Jul 2008 10:36 by Gene Buccelleto
I have been trying to do a 'find and replace' on some hardcoded URLs added to dozens of pages. The 'find and replace' ends up corrupting the page formatting. Looks like SharePoint Designer is as buggy as FrontPage was!

Sunday, 27 Jul 2008 10:36 by SF
Sharepoint designer messed up all the /List pages on my site to such an extent that I had to reinstall it again. Any suggestions

Sunday, 27 Jul 2008 10:36 by Diep
To: Davinder Singh, I am having the same problem with not able to open any file within sharepoint designer. Did you ever find a solution? Thanks!

Sunday, 27 Jul 2008 10:37 by Neil Mosafi
I'll have to join you in this rant as I have exactly the same problem and it's highly infuriating. How on earth did this pass QA at Microsoft? Especially when Visual Studio's HTML designer is so great, this should be the same! I find self closing tags often cause problems, e.g. if I have an <h2><SharePointWebControls:FieldValue .... /></h2> the closing h2 tag is always removed. If however I use <h2><SharePointWebControls:FieldValue ....></SharePointWebControls:FieldValue></h2> it works. I also find Sharepoint Designer adds &nbsp; in random places too and it has even once attempted to add a full set of html, head, and body tags around my markup, despite the fact sharepoint uses master pages! This is the value of keeping page layouts in source control and editing them in Visual Studio...

Sunday, 27 Jul 2008 10:37 by Simon
I've just finished working on a large Sharepoint intranet implimentation and have also been plagued by issues such as this. Another frustrating issue I came upon was Sharepoint Designer's inability to recognise code validity seperated into different content placeholders, for example: I place an opening Div tag at the top of my master page in a content placeholder and close it at the end of the master page using in another content placeholder, with several other content placeholders inbetween. Why would I want to do this rather than simply place the div outside the content placeholders? It allows you to override the opening div's attributes on a page by page basis or remove the opening and closing div's all together using asp content blocks in the page layouts while setting a page-wide default. Sharepoint Designer however see's things differently and simply closes the opening div before the end of the placeholder, nullifying the desired goal. The only sure fire way I found to avoid all these problems was to open, edit and save files as plain text (right click on the file in Sharepoint Designer and select "2 Sharepoint Designer (Open as Text)"), of course this kind of defeats the point is using Sharepoint Designer as you no longer get the benefit of intellisense or code completion and there are certain features that require you to be in "Design" mode. Until Microsoft fix the problems in Sharepoint Designer (or preferably make the functionality available through Visual Studio) this seems to be the only way to ensure your code doesn't get munched!

Sunday, 27 Jul 2008 10:37 by Jake Carter
Sorry to bring this back from the dead, but I'm having the same issue. Has anyone found a fix for the designer (not just the workaround Simon stated)? I'm really getting sick of SP Designer reformatting my xhtml. Thanks... :// Jake

Tuesday, 19 Aug 2008 04:42 by Martin Saalmann
No fix, but a rather easy workaround: It seems Sharepoint Designer messes the code if there is no seperate closing tag in between. So instead of writing <h1><SharePointWebControls:Textfield Fieldname="somefield" runat="server" /></h1> (which will be destroyed) just write: <h1><SharePointWebControls:Textfield Fieldname="somefield" runat="server"></SharePointWebControls:Textfield></h1>

Tuesday, 19 Aug 2008 06:38 by Martin Saalmann
No fix, but a rather easy workaround: It seems Sharepoint Designer messes the code if there is no seperate closing tag in between. So instead of writing <h1><SharePointWebControls:Textfield Fieldname="somefield" runat="server" /></h1> (which will be destroyed) just write: <h1><SharePointWebControls:Textfield Fieldname="somefield" runat="server"></SharePointWebControls:Textfield></h1>

Tuesday, 30 Sep 2008 05:32 by M.Prakash
PROBLEM: Full text search not working. No errors reported CAUSE: Corruption of the index was reported during the full text catalog creation process. SQL Server was on an unsupported platform. It was noticed that the Full Text Catalog was being built successfully on the passive node RESOLUTION: We applied Service Pack 2 for SQL Server 2005 after which we noticed that we were able to build the Full Text Catalog successfully and the SharePoint search was also working as expected http://support.microsoft.com/kb/928537 http://support.microsoft.com/kb/222318 Still U have any questions U can email me I will be more than happy to assist you Thanks, M.Prakash SharePoint Administrator

Wednesday, 1 Oct 2008 09:31 by Matt Connolly
I've got a topper. In addition to discovering that wonderful "Sharepoint Designer deletes the closing h1 tag on a save" issue, I am constantly seeing a non-breaking space '&nbsp' (hopefully this comment is html-escaped) being inserted right after the opening h1 tag. When I open the layout file, the <h1> is on one line and the rest of the code is on the next line like this: <h1> <SharePointWebControls:Textfield Fieldname="somefield" runat="server" /></h1> I watch as Sharepoint Designer moves them back onto the same line while inserting the non-breaking space: <h1>&nbsp;<SharePointWebControls:Textfield Fieldname="somefield" runat="server" /></h1> INFURIATING. The file is still checked in and unmodified, by the way. When I open in notepad or Visual Studio, there is a TON of junk code inserted by the designer that is invisible when viewing in Designer. My h1 code is all on one line when I view it this way.

Wednesday, 1 Oct 2008 09:58 by Matt Connolly
Possibly a fix for my second problem: I bumped the "right margin" setting from 80 to 160 and it no longer wraps! I also adjusted the "line breaks before" and "line breaks after" settings to 0 for h1 tags in the Page Editor settings, so maybe that will help, too.

Wednesday, 19 Nov 2008 09:29 by J.J.
I discovered that the added &nbsp; bug can be avoided by placing the webcontrol in a span. So replace: <h1><SharePointWebControls:Textfield Fieldname="somefield" runat="server" /></h1> with: <h1><span><SharePointWebControls:Textfield Fieldname="somefield" runat="server" /></span></h1>

Monday, 24 Nov 2008 02:38 by Pill Store
Very good job. Add your blog to bookmarks.

Thursday, 11 Dec 2008 07:27 by Kumpf
Where is my Car?

Friday, 12 Dec 2008 03:50 by cialas
Thank you for this post. It’s wery important problem for my. I often use Sharepoint designer.

Thursday, 26 Mar 2009 10:25 by ILoveSharePoint
Sharepoint is a piece of work allright... Gosh and corporations got sucked into it.. Good job M$, good ugly job..

Tuesday, 21 Apr 2009 04:30 by Mach
Earlier I too was not able to open .aspx pages in sharepoint designer. After re-installation, I'm now able to open and edit them.

Friday, 23 Oct 2009 08:59 by misk
No fix, but a rather easy workaround: It seems Sharepoint Designer messes the code if there is no seperate closing tag in between. So instead of writing <h1><SharePointWebControls:Textfield Fieldname="somefield" runat="server" /></h1> (which will be destroyed) just write: <h1><SharePointWebControls:Textfield Fieldname="somefield" runat="server"></SharePointW

Thursday, 29 Oct 2009 09:16 by csallen
Anyone having this problem? When I open a workflow in designer, one of the list fields is just dropped. It's like the linkage to the list has been corrupted. For instance the workflow statement will read: Set [ListName:%]..... instead of: Set [ListName:FieldName%]. I'll then restore the field name with via the lookup, click OK to save and finish to compile. I can run the workflow for a couple of days, but then the field name will drop again. Any thoughts?

Wednesday, 3 Feb 2010 04:22 by smotth
Sharepoint is a piece of work allright... Gosh and corporations got sucked into it..

Wednesday, 3 Feb 2010 04:26 by asasfa
Earlier I too was not able to open .aspx pages in sharepoint designer.

Friday, 5 Feb 2010 03:19 by youtube erotik izle
you can found from google

Monday, 10 May 2010 09:37 by Mark
I'm having an even weirder issue (basically the same but on a grander scale now): Any change I do in Code, it will revert after either clicking on the Design part, or on Save....no matter if it is 4 characters change or 10 lines. This takes loads of time. I have the feeling it might be in the connection to the server, but we are running a high level intranet here. Anybody else see this pop-up?



Url

Email

Comments