Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm using Umbraco 7 and I get an XML namespace in my HTML tag:
<html xmlns:umbraco="http://umbraco.org" class="no-js">
Is there a way to remove this? Not that I think it really matters, but it prevents the page from validating in the W3C validator which is annoying. It's not present in the template:
Are you using some custom extensions within your XSLT file?
However you should simply make sure that the umbraco namespace is excluded in your XSLT file. In the top of the XSLT file add "umbraco" to your exclude-result-prefixes attribute of the xsl:stylesheet element.
Hope this makes sense.
Yes, it makes sense - and thanks for replying!
This markup in question is not generated from an XSLT-file, it's part of a page template in masterpages. I do have XSLT-macros on the page, but the HTML-tag is not generated by any of them. I'm not using any special extension in any of the XSLT-files.
Hmm, that's really odd!
How do you setup your template and which macroes are in use?
Looks like I have a similar problem. Here's my tag:
<html xmlns:umbraco="http://umbraco.org" xmlns="http://www.w3.org/1999/xhtml">
I have no idea where "xmlns:umbraco="http://umbraco.org" comes from. Not using XLST.
This site is now running on v7, but it was upgraded from v6.
Did some quick tests. This is all in v7.
Link to screen captures: https://www.evernote.com/shard/s215/sh/634238b2-f62c-4ea7-b8b5-16742f0eae5d/f6260881deaedb6bf260ce323cb4db2b
Has anyone found a way to remove this?
I don't think so - What version of Umbraco are you seeing it on? It might be a bug, which needs to be reported perhaps.
Sorry I should have checked that. The website in question is running v7.0.4 but newer versions don't have the same issue.
It might be possible to upgrade the website but would this sort of thing be in a changeset that I could manually change the code for?
A search within the solution doesn't seem to bring back an occurrence of it.
I have the same problem. Umbraco version is 7.1.8 running on webforms.
My v7.0.4 is running WebForms and has the issue. If I switch to MVC the issue remains.
My v7.1.8 running MVC doesn't have the issue.
Ok, sounds like a bug when running webforms then - would one of you report it on the issue tracker? :)
I thought that initially but I switched my v7.0.4 to MVC and the problem remains.
I've found the code in the source for the default master:
protected override void Render(HtmlTextWriter writer)
// get base output
StringWriter baseWriter = new StringWriter();
string baseOutput = baseWriter.ToString();
// add custom umbraco namespace (required for events on custom tags in IE)
baseOutput = baseOutput.Replace("<html", "<html xmlns:umbraco=\"http://umbraco.org\"");
// write modified output
Judging by the comment - it's in there on purpose - but I'm not entirely sure why. I can't see any conditional logic either so why it's displaying on some installs and not on others is a bit of a mystery at the moment?
Arie has already created a bug request in the tracker which we can up vote here: http://issues.umbraco.org/issue/U4-5188
The comment in the source code does suggest it is there on purpose but some clarification on why it's needed and why it shows on some installs and not others would be awesome.
Just got this and it looks like it's not going anywhere soon.
I have hacked around it - looking at the code Ian posted from the source, umbraco is matching <html
So I have changed my tag to <Html> (upper case H) this stops the match and it doesn't get added (don't forget to do the same to closing tag).
bit nasty would be nice to get it fixed in the core too.
I know this thread is a bit old, but I can confirm that the same issue is happening in v7.4.1. I am running webforms and have not tested it in MVC, so I don't know if it is related to that.
I changed my tag from to and that prevented the markup from being added.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted