spike-spiegel Posted November 8, 2013 Share Posted November 8, 2013 (edited) I've been doing my homework for 2 days and still couldn't find a solution, there is this template that is a blogger template, I exported it from another blog, then it should be working, but it isn't. When I try to upload it I get the error: We were unable to save your template.Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly. XML error message:Content is not allowed in prolog. There were duplicated IDs, I changed them all, and still get the error. Checked the script with W3C, there were 36+ errors plus warnings, so I kept fixing each one, until I finally got only 2 errors and 6 warnings: Notes and Potential IssuesThe following notes and warnings highlight missing or conflicting information which caused the validator to perform some guesswork prior to validation, or other things affecting the output below. If the guess or fallback is incorrect, it could make validation results entirely incoherent. It is highly recommended to check these potential issues, and, if necessary, fix them and re-validate the document. Using experimental feature: HTML5 Conformance Checker. The validator checked your document with an experimental feature: HTML5 Conformance Checker. This feature has been made available for your convenience, but be aware that it may be unreliable, or not perfectly up to date with the latest development of some cutting-edge technologies. If you find any issues with this feature, please report them. Thank you. Missing "charset" attribute for "text/xml" document. The HTTP Content-Type header (text/xml) sent by your web browser (Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Firefox/24.0) did not contain a "charset" parameter, but the Content-Type was one of the XML text/* sub-types. The relevant specification (RFC 3023) specifies a strong default of "us-ascii" for such documents so we will use this value regardless of any encoding you may have indicated elsewhere. If you would like to use a different encoding, you should arrange to have your browser send this new encoding information. Character Encoding Override in effect! The detected character encoding "us-ascii" has been suppressed and "utf-8" used instead. Byte-Order Mark found in UTF-8 File. The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is known to cause problems for some text editors and older browsers. You may want to consider avoiding its use until it is better supported. Conflict between Mime Type and Document Type The document is being served with the text/xml Mime Type which is not a registered media type for the Document Type. The recommended media type for this document is: Using a wrong media type for a certain document type may confuse the validator and other user agents with respect to the nature of the document, and you may get some erroneous validation errors. How to fix this problem? One of the following techniques should help: If you are serving a static file on a Web server, changing its extension should help. Use e.g .xhtml for XHTML or .mml for MathML. You may need to reconfigure your Web server. This Setting up MIME Types tutorial has instructions for Apache, Tomcat and IIS. If the document is generated dynamically, the scripting language should allow you to set up the mime type: this article on MIME Types and Content Negotiation has examples in PHP, Perl, and ASP. ↑ TopValidation Output: 2 Errors The preferred Content-Type for XHTML5 is application/xhtml+xml. The Content-Type was text/xml. ✉ Line 3, Column 6: Unnamespaced element html not allowed in this context. (Suppressing further errors from this subtree.) <html> ✉ Line 5, Column 48: undeclared element prefix in: b:include <b:include data='blog' name='all-head-content'/> Anyway, I don't think that's what's preventing the template from installing. This is the xml file: http://hidemyass.com/files/vIx1j/ Edited November 8, 2013 by spike-spiegel Quote Link to comment https://forums.phpfreaks.com/topic/283733-trouble-with-xhtml-template/ Share on other sites More sharing options...
requinix Posted November 8, 2013 Share Posted November 8, 2013 The errors are in the first few lines of the file. How about posting them so we don't have to download something? Unnamespaced element html not allowed in this context. (Suppressing further errors from this subtree.)You probably have something else around that point that's causing the problem. undeclared element prefix in: b:includeHTML doesn't support other namespaces (which is what b:include is doing). I bet that's some sort of templating thing that's supposed to get interpreted by something on the server and transformed into normal HTML for the client? In which case it sounds like the templating thing isn't executing (considering how you're validating through the browser, which should have received the correct post-templating output). Quote Link to comment https://forums.phpfreaks.com/topic/283733-trouble-with-xhtml-template/#findComment-1457589 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.