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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 02:46:16
Script start
Timing: Jan 18 2025 02:46:16
Module start 'layout'
Timing: Jan 18 2025 02:46:16
Module start 'content'
Timing: Jan 18 2025 02:46:17
Module end 'content'
Timing: Jan 18 2025 02:46:17
Script end

Main resources:

Total runtime1.3273 sec
Peak memory usage4,096.0000 KB
Database Queries76

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0079 589.3359152.6250
Module start 'layout' 0.00790.0046 741.960939.4531
Module start 'content' 0.01241.3129 781.4141697.6875
Module end 'content' 1.32530.0019 1,479.101620.1641
Script end 1.3272  1,499.2656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.2690160.0002
Check MTime0.00140.1057160.0001
Mysql Total
Database connection0.00080.060610.0008
Mysqli_queries1.237493.2279760.0163
Looping result0.00080.0627740.0000
Template Total1.287597.020.6437
Template load0.00230.171920.0011
Template processing1.285296.829120.6426
Template load and register function0.00060.047910.0006
states
state_id_array0.00090.068610.0009
state_identifier_array0.00100.079020.0005
Override
Cache load0.00210.1555590.0000
Sytem overhead
Fetch class attribute can translate value0.00100.077340.0003
Fetch class attribute name0.00180.1365110.0002
XML
Image XML parsing0.00170.128340.0004
class_abstraction
Instantiating content class attribute0.00000.0022130.0000
General
dbfile0.00130.0948290.0000
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
15content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/emphasize.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/emphasize.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 38
 Number of unique templates used: 8

Time used to render debug report: 0.0001 secs