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

eZ debug

Timing: Jan 17 2025 23:44:00
Script start
Timing: Jan 17 2025 23:44:00
Module start 'content'
Timing: Jan 17 2025 23:44:00
Module end 'content'
Timing: Jan 17 2025 23:44:00
Script end

Main resources:

Total runtime0.8383 sec
Peak memory usage4,096.0000 KB
Database Queries213

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0045 588.8359180.8516
Module start 'content' 0.00450.6943 769.6875702.7656
Module end 'content' 0.69870.1395 1,472.4531344.4453
Script end 0.8383  1,816.8984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4110210.0002
Check MTime0.00130.1578210.0001
Mysql Total
Database connection0.00050.060710.0005
Mysqli_queries0.748189.23412130.0035
Looping result0.00230.27262110.0000
Template Total0.819297.720.4096
Template load0.00200.237420.0010
Template processing0.817297.482820.4086
Template load and register function0.00020.021110.0002
states
state_id_array0.00050.055010.0005
state_identifier_array0.00110.131620.0006
Override
Cache load0.00180.2128590.0000
Sytem overhead
Fetch class attribute can translate value0.00250.298350.0005
Fetch class attribute name0.00130.1502110.0001
XML
Image XML parsing0.00200.238250.0004
class_abstraction
Instantiating content class attribute0.00000.0035130.0000
General
dbfile0.00250.2947400.0001
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 38
 Number of unique templates used: 8

Time used to render debug report: 0.0002 secs