Forums / Developer / translation.ts doesn't work after upgrading from 3.4.2 to 3.5.0

translation.ts doesn't work after upgrading from 3.4.2 to 3.5.0

Author Message

Anja Lundin

Wednesday 23 February 2005 1:22:24 am

Hi,
After upgrading from 3.4.2 to 3.5.0 the translation-file doesn't work at all.
I first upgraded the site (the very same site, but with less information in the database) on my localhost and it works fine here!

Now I wanted to upgrade the site on the web as well, but I get a fatal error: (Call to a member function on a non-object in /home/n/novitell/www/lib/ezi18n/classes/eztstranslator.php on line 267)

The old translation.ts file still works fine after the upgarding on the web, but uploading the new file causes the error.

Uploading the old file works fine, so I guess there's no problem with the ftp-program.

I have cleared all cache between the uploads, so it can't be a chache problem either.

I use the swe-SE translation file.

I find this problem very strange and a bit annoying. The two sites are identical with the only differance that one of them is on the localserver and the other on the web.

Has someone had this problem before?

Thanks in advance!
/Anja

------------------------------------
Anja Lundin
Developer, Novitell AB
Sweden

www.novitell.se

Frederik Holljen

Wednesday 23 February 2005 1:39:50 am

Where did you get the new tranlation.ts file? When looking at the code it seems like you should get some warnings if you experience this problem. Can you check your logs and debug output and see if you can spot any problems?

Anja Lundin

Wednesday 23 February 2005 1:44:31 am

The file is the one that came with ezpublish 3.5.0.

I'll check the debug now...
Thanks!

------------------------------------
Anja Lundin
Developer, Novitell AB
Sweden

www.novitell.se

Anja Lundin

Wednesday 23 February 2005 2:20:36 am

I found 3 warnings:

Warning: PHP Feb 23 2005 11:11:10
session_module_name() has been disabled for security reasons in /home/n/www/site/lib/ezutils/classes/ezsession.php on line 197

Warning: PHP Feb 23 2005 11:11:10
domxml_open_mem(): xmlParseEntityRef: expecting ';'
in /home/n/www/site/lib/ezxml/classes/ezxml.php on line 88

Warning: PHP Feb 23 2005 12:08:08
domxml_open_mem(): Specification mandate value for attribute t
in /home/n/www/site/lib/ezxml/classes/ezxml.php on line 88

If I change to the old ts-file the domxml_open_mem() warning doesn't appear.

 

------------------------------------
Anja Lundin
Developer, Novitell AB
Sweden

www.novitell.se

Frederik Holljen

Wednesday 23 February 2005 5:01:48 am

There seems to be an error in the translation file or some strange bug in the XML parser. Can you report a bug (refer to this discussion) and I'll take a quick look at it later today.

Anja Lundin

Thursday 24 February 2005 1:57:36 am

Hi,
I'm really sorry but it seems to me that the error occured due to an error in the translation.ts file. A misstake made by me! One of the tags looked like this:

<translation t>

When I deleted the "t" the site works without the error!

Why it did work on the local machine and not on the web, was simply because I had disabled extension=php_domxml.dll in my php.ini.

I also had to disabled the following code in ezxml.php (if I don't it seems that the translation.ts file is not read at all.):

 

if ( $native and function_exists( 'domxml_open_mem' ) )
        {
            /* We remove all control chars from the text, although they
             * should have not be there in the first place. This is
             * iso-8859-1 and UTF-8 safe. */
          $xmlDoc = preg_replace('/[\x00-\x09\x0b-\x0c\x0e-\x1f]/', '', $xmlDoc);
            return domxml_open_mem( $xmlDoc );
        }

Mabybe this is a bug?

Thanks for your help!

------------------------------------
Anja Lundin
Developer, Novitell AB
Sweden

www.novitell.se