This website uses cookies to improve your experience and deliver relevant information.

We build solid foundations

Our holistic, strategic approach to design, development and marketing means we help you build a strong, sustainable digital presence

 

on Wednesday, 19 September 2012

FaLang won't translate my extension, it just Whitescreens

For those who aren't familiar with FaLang, it's a Joomla extension designed to help with multi-lingual sites. As well as providing translations of your content, it allows for translation of module, plugin and component content (such as text you might set in module parameters).

We think it's pretty great, but discovered an issue with it earlier. For the benefit of those who may be experiencing the same issue, I thought I'd post the cause and how to fix it!

So, the issue is that when trying to enter into the translation screen for an extension (in our case, a couple of modules) you get a white screen, possibly with some of the module settings on it. So the replication chain is

Components->FaLang->Translation->{Select Language & Content Element}->extension

The cause (and fix) are actually quite simple. At time of writing we're using FaLang version 1.1.3, but the issue does also appear to be present in the latest version (1.1.6).



So, here's how simple it is. When creating an extension, you create a manifest file - usually the name of your extension .xml (i.e. mod_bookmarksreloaded.xml). 

Within this manifest file you specify the parameters that are presented to the user on the module configuration page, in a block such as the following

<config>
<fields name="params">
<fieldset basic="basic"
description="Basic parameters for module mod_blah">
<field name="foo"
type="text"
default="bar"
size="10"
label="Foo"
description="Enter some text"/>
</fieldset>
</fields>
</config>

It's a fairly simple example, but if you browse to the relevant config file you'll see a real-world example. To find the config file (assuming it's a module) you'll want modules/{name of your module}/{name of your module}.xml (e.g. modules/mod_vcm/mod_vcm.xml)

Cause/Fix

Now the cause of the whitescreen is quite simple, although Joomla! supports use of the 'description' attribute on fieldsets, it appears that FaLang does not (I've submitted a bug report, so hopefully we'll see a fix soon). So to fix the issue, look for any <fieldset> tag containing the attribute 'description' and remove it. So our example above becomes

<config>
<fields name="params">
<fieldset basic="basic"
>
<field name="foo"
type="text"
default="bar"
size="10"
label="Foo"
description="Enter some text"/>
</fieldset>
</fields>
</config>

Save the file, and try editing the translation in FaLang again. Everything should work now! Just be aware that if you do update the module, a new manifest will be installed and you'll need to repeat these steps.

 

We're specialists in Content Management Systems Want to work with the experts?

Virya Group provides a range of solutions to your technology needs