Troubleshooting Options
|
ECEn XML Web Templates: Troubleshooting
Need help? We understand. Nothing can be so frustrating as to bring up your favorite web browser, expect to see your lovely new webpage, and instead be presented with a blank white screen or some XML parse error. Luckily, there are really only a few common errors people run into when using the ECEn XML Web Templates and they are all fairly easy to fix. Browsing through these troubleshooting pages will help you solve common problems, avoid problems in the future, and report bugs in the template system.
If you’ve run into trouble with ECEn XML Web Templates, browse through some of these problems to see if they might fit your situation. If not, please let the ECEn Web Team know, and we’ll help you resolve the problem. | General Problem Area | Symptoms | Solution |
|---|
Broken XML
Finding mis-matched tags
| I see the error page:
An error was encountered while parsing the XML file…
Opening and ending tag mismatch
| Usually this means you’ve forgotten or misspelled a closing tag. The line numbers on the error message are usually quite helpful in helping you find the missing tag.
To fix the problem:
Find the missing closing tag.
For example, if you see that your <page> and <content> tags are complaining, it should tip you off that you are missing a closing <section> tag somewhere.
But I have so many sections! Using the fact that the <page> and <content> tags are complaining, you know you are missing a <section> tag which is a child of your <content> tag and you don’t need to worry about any of the sections that are children of other sections.
What is a “child tag” in XML? For example, if I create a <section> tag and place a <text> tag within it, then the <text> tag is a child tag of the <section> tag.
Closing <text> tag and <section> tags are the most often forgotten. If you use the free XRAY XML editor, it will notify you as you type your XML file that a tag is missing.
It can also indicate a misspelled closing tag. Remember that XML is case sensitive, so using an uppercase closing tag for a lowercase starting tag would behave just as if the closing tag were missing or misspelled.
| Broken XML
‘<’ and ‘&’ run amuk
| I see the error page:
An error was encountered while parsing the XML file…
xmlParseEntityRef: no name
| Usually this means that you have a stray ‘&’ in your document. This character has special meaning for XML which implies that XML does not treat ‘&’ like a normal text character.
To fix the problem:
Replace ‘&’ with ‘&’ (meaning ampersand).
| Broken XML
‘<’ and ‘&’ run amuk
| I see the error page:
An error was encountered while parsing the XML file…
StartTag: invalid element name
| Usually this means that you have a stray ‘<’ in your document. This character has special meaning for XML which implies that XML does not treat ‘<’ like a normal text character.
To fix the problem:
Replace ‘<’ with ‘<’ (meaning 'less than').
| Whitespace between tags, and in general
| I see my actual web page, but some of my words don’t have spaces in between them.
| So, what’s whitespace? Technically, it is any set of spaces, tabs, line breaks, etc. So, to fix your whitespace problem there are a few things you ought to understand about how the ECEn XML Web Templates handle whitespace: | 1 | When you are creating content text, special text included, the ECEn XML Web Templates will not guess where you might like whitespace, which means that you must specify your whitespace in every <text> and <special-text> tag.
|
| 2 | If you place several spaces or tabs within text tags, the XML templates will only render one space, no matter how much whitespace you place within, before or after the text. Even if you add several text tags, with nothing but whitespace within them, you will still only see one space. If you are spending a lot of time trying to make certain text have whitespace, such as an indent in front, try using a list, or indented sections. Check out the ECEn XML Web Templates Reference. Just so you know, this issue of collapsing whitespace is not unique to the ECEn XML Web Templates. Most web pages handle whitespace this way thanks to the way HTML
handles whitespace.
|
| Broken .phtml files
| I see the error page:
An error was encountered while parsing the XML file…
warning: failed to load external entity “index.xml”
| Your .phtml and .xml files must have the same name. The ECEn XML Web Templates use the name of the .phtml file to find its corresponding .xml file. If it isn’t there, your page won’t render.
To fix the problem:
Make sure the .xml and .phtml file have exactly the same name. Case matters: index.xml and INdeX.phtml will cause problems.
| Broken .phtml files
| I see a blank, white page.
| This probably means there is something wrong with your .phtml file. To fix the problem:Try downloading this sample .phtml file, rename it to match your .xml file, and it should fix the problem.
| Broken .phtml files
| I see the error page:
An error was encountered while parsing the XML file…
I/O error: Permission denied
| This probably means that the permissions on your XML file are not correct. To fix the problem:Make sure that the .xml file is world readable. If you’re unsure of how to do this, let the ECEn Web Team know, and they’ll be happy to help out.
| Hard to read XML files
| I see all of the XML on one line with little boxes everywhere.
| This probably means you have opened a file in NotePad (Windows) created on Linux/Unix.
This happens many operating systems recognize various
newline characters differently.
To fix the problem:
Open the offending XML file in WordPad.(Right click on the file and from the
menu, select 'Open with', and from that menu, select WordPad). Save the file
in WordPad.
You can then close WordPad and open the file in NotePad. The XML file should be easier to read with the linebreaks in place and the boxes gone. Or, if you like, you can continue to work in WordPad.
|
|