Forums / General / ezPublish Translation mixup

ezPublish Translation mixup

Author Message

Alex Mayfield

Tuesday 22 February 2011 7:13:36 am

I'm trying to create a development mirror site of an ezPublish site so I can stage changes without messing up the main site. I copied the database and the filesystem and changed the ini files to point at the new database, but when I loaded the page I found that none of my objects were being loaded.

So I break out the debug bar, and I find that for some reason the language_mask that is being used is incorrect...the bitfield is set to 4 while the mask being used in the query to load the page is 3.
So I poke around the ini files and I see a setting called `SiteLanguageList[]` which seems to set up 'backup langauges'. I found that If I set `SiteLanguageList[]` to:

SiteLanguageList[]=eng-US
SiteLanguageList[]=eng-GB

and my site started showing up. Yay!

However, all is not well. When I actually try to EDIT the page in the admin, every entry shows up blank. What makes things doubly weird is that it shows up in the admin as long as I'm merely looking at it. And then there's this weird discrepancy, where depending on where I'm looking in the admin, it either says that the page is eng-US or eng-GB depending on where I'm looking _on the same page_.

http://i.imgur.com/59rLS.png

What is going on here? If I click the edit button, nothing shows up.

Peter Keung

Tuesday 22 February 2011 8:15:30 am

We just debugged a similar case where the list of languages (Setup > Languages in the Administration Interface) was for some reason empty. Re-adding the relevant languages in that interface fixed the problem. Could that also be the solution for you?

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada

Nicolas Pastorino

Tuesday 22 February 2011 8:15:45 am

Hi Alex, and welcome to the eZ Community !

Which version of eZ Publish are you using ?
Another key configuration directive in the multi-language feature is

[RegionalSettings]
ContentObjectLocale=eng-GB

Are the values for this directive identical in both installations ? Are they also identical for respectively your front-end and admin siteaccesses ?

Let us know,
Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Alex Mayfield

Tuesday 22 February 2011 8:38:33 am

Thanks for the replies. The site is running ezPublish 4.2.0, and this is my first time working with ezPublish.

The list of languages in both sites are identical. However, curiously, the numbers beside the languages were not:

Dev site: American English and British English are installed. There are 1135 translations and 15 classes translations for American English, and 1585 translations and 31 classes translations for British English.

Live site: American English and British English are installed. There are 2835 translations for American English and 0 for British English. Classes translations are identical.

This dump is several weeks old. I did not personally do the dump, but the one who did claims that he just did a mysqldump and restore just like we do for every other site.

As for the settings, since the directories were copied, the settings should be identical, and a diff of the two directories only showed uninteresting things like cache and logs. The regional settings block that the live site was using was this:

 [RegionalSettings]
Locale=eng-US
ContentObjectLocale=eng-US
ShowUntranslatedObjects=enabled
SiteLanguageList[]=eng-US
TextTranslation=enabled

With those settings, the dev site did not work until I added eng-GB to the list of allowed languages. Changing the Locale and ContentObjectLocale had no effect.

I've tried clearing cache, no dice.

Bertrand Dunogier

Tuesday 22 February 2011 9:11:35 am

The screenshot you've shown us is really weird. No main node, no creator, mismatch between object language and translation... that's quite a lot of weirdness ;-)

Exporting & importing SQL dumps usually isn't a problem with eZ Publish, and I don't see why it would have been one for you.

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Alex Mayfield

Tuesday 22 February 2011 2:18:49 pm

Thanks for your advice. The fact that you came out and kind of implied that there's no reason the data should be in that configuration clued me in on it indeed being a data issue.

I was told that the database had been moved to the dev database by someone else...twice, which is why I had not tried it myself. When I did it myself, suddenly everything fell into place and worked.

Thanks.

Nicolas Pastorino

Tuesday 22 February 2011 2:41:40 pm

I like happy-ends like that.

Thanks for sharing the final outcome Alex.

See you around the eZ Community,
Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Bertrand Dunogier

Wednesday 23 February 2011 6:55:03 am

Alex,

glad my skeptical answer was of any help to you !

Reminder to mark your question as solved using the nifty icon next to the initial post's title, please :-)

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier