Archived Posts from this Category

How to resolve “XML Parsing Error at 1:1. Error 4: Empty document” when installing a Joomla template or extension

Posted by Jim DeLaHunt on 08 Feb 2009 | Tagged as: Joomla, robobait

Recently, I remodelled a Joomla template for one of my clients.  As I was installing newer versions of the template, I noticed an error message started appearing on installation:

XML Parsing Error at 1:1. Error 4: Empty document

However, the installation seemed to be successful. And I had a valid templateDetails.xml file in my template’s .zip file. There was a Joomla! forum thread “XML Parsing Error at 1:1. Error 4: Empty document” dating from December 28, 2008 about this problem, so it wasn’t just me.

Here is my diagnosis of the problem, and my solution.  Since this is one of those problems that drove me crazy, I’m going to put my findings here in hopes that search engines will find it and bring it to others who might benefit from the tip. Hence, it’s tagged “robobait”.

The short answer: the error message comes from a metadata file named ._templateDetails.xml, which the Mac OX 10.5.x Finder inserted into the ZIP archive. This file didn’t have XML content, but the Joomla installer interpreted it as such. And the content it did have, happened to be the kind of invalid content that provoked an error message instead of silent failure. The immediate solution is to generate the ZIP file in such a way that there is no metadata file named ._templateDetails.xml . Long-term, it would be nice if Joomla! would not display an error message in this situation.

Read on for more about the problem, the diagnosis, and possible solutions. Continue Reading »

Jim presents to Joomla Day Vancouver this Saturday, June 14, 2008

Posted by Jim DeLaHunt on 11 Jun 2008 | Tagged as: CMS, Joomla, Vancouver, i18n, meetings and conferences, multilingual

There is a Joomla! Day in Vancouver this Saturday. I’ll be giving a brief presentation, on as an example of a multilingual Joomla! website, with human-friendly URLs.

Continue Reading »

“Web 2.0 goes to Babel: Multilingual websites and user-supplied content” at IUC32

Posted by Jim DeLaHunt on 31 May 2008 | Tagged as: CMS, Joomla, Unicode, i18n, meetings and conferences, multilingual

Oh right, I forgot to mention: I’ve been accepted to present to the 32nd Internationalization & Unicode Conference this September! I’m presenting on a topic which I’ve been working on lately: multilingual websites. The title is: Web 2.0 goes to Babel: Multilingual websites and user-supplied content.

Continue Reading »

Human-friendly URLs for a multilingual Joomla! site (

Posted by Jim DeLaHunt on 05 Mar 2008 | Tagged as: CMS, Joomla, multilingual

I want my site,, to be a multilingual site that communicates the business I want to do and lets me explore the tools for being world-ready. For nearly two years, I’ve worked to get a combination of tools that would do the job. I’m happy to say that this week I finally assembled a plausible solution. The final piece was sh404SEF, after some patching, with Joomla! 1.0.x and Joom!Fish.

Language support on supports content in multiple languages (English, Japanese, and German so far), and also a user interface in multiple languages (the same three now, but could differ). Each URL can include a language code between the domain name (””) and the path to the content. The language codes look like “/en/” for English, “/de/” for German, and “/ja/” for Japanese. The codes are based on RFC 3066 . Where there is a language code in a URL, the site presents content localised for that language, to the extent possible. The content may not always available in that language, so the site may present the content in a fall-back language.

Where there is no language code in a URL, especially in the basic domain name, the site looks at the HTTP Accept-Language header to determine which language the user prefers, and redirects the browser to content with that language code.

It’s important to me that the URLs of content on my site be  concise, comprehensible to humans, and stable over time. I like Jakob Nielsen’s “URL as UI” column, and the W3C’s “Cool URIs don’t change“, and try to follow them.

Software used on is built using Joomla!, a free software content management system (CMS). Version 1.0.x of Joomla!, which I use as of early 2008, can be coaxed into using UTF-8 text encoding and tolerating multi-lingual content. I add in Joom!Fish, a Joomla component which helps manage content in multiple parallel languages, and provides useful language utilities like that UI widget at the top of the page, to select between languages.

Joomla has many strengths, but easy-to-read URLs aren’t among them. Left to itself, a Joomla URL is an opaque stream of numbers and codes. Turning those URLs into human-friendly URLs, which are concise, comprehensible to humans, and stable over time is the work of a “SEF” (Search-Engine-Friendly) component. Joomla has had several, but the first which satisifed us for is one called sh404SEF (see also sh404SEF on Joomla extensions and sh404SEF on

There has been a tough interaction between Joomla, Joom!Fish, and sh404SEF (and its ill-starred predecessors). Since mid-2006, Joomla would work with either of the other two, but not both together. Even as Joomla! moved forward to version 1.5.x, which has a better foundation for multilingual sites, I was held back to Joomla 1.0.x because Joom!Fish didn’t support the new version yet. Finally, in late February 2008, I discovered version 1.3.1 “TEST PR build 255″ of sh404SEF, which seemed to work well with Joom!Fish (currently 1.8.2) and Joomla (currently 1.0.15).

I made a patch to sh404SEF, one of the modules that extends the Joomla! content management system that runs this website. What the patch does is to ensure that all three of the languages supported on this website are treated equally in the URLs of this site. Without the patch, the “/en/” tag for URLs of English-language content would be missing in some cases. See my article “Default-language patch for sh404SEF published” for a description of the patch, and a link to the code.

« Previous Page