Jump to content

Recommended Posts

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 Issues

The 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.

  1. info.png 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.

  2. warning.png 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.

  3. warning.png Character Encoding Override in effect!

    The detected character encoding "us-ascii" has been suppressed and "utf-8" used instead.

  4. warning.png 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.

  5. warning.png 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.

↑ Top

Validation Output: 2 Errors
  1. warning.png The preferred Content-Type for XHTML5 is application/xhtml+xml. The Content-Type was text/xml.

  2. error.png Line 3, Column 6: Unnamespaced element html not allowed in this context. (Suppressing further errors from this subtree.)
    <html>

  3. error.png 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 by spike-spiegel
Link to comment
https://forums.phpfreaks.com/topic/283733-trouble-with-xhtml-template/
Share on other sites

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:include

HTML 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).
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.