Forums / Install & configuration / ShowUntranslatedObjects overrules fetch(only_translated)

ShowUntranslatedObjects overrules fetch(only_translated)

Author Message

Marc Boon

Saturday 13 May 2006 8:37:39 am

After upgrading to 3.8 I have this problem:
The setting

 
[RegionalSettings]
ShowUntranslatedObjects=enabled/disabled

in site.ini.append.php seems to override the value of only_translated in a fetch(content, list/tree) function. Setting only_translated to true() or false() has no effect at all.
Is this intended behaviour or a bug?

Marc Boon

Sunday 14 May 2006 6:18:56 am

After reading this article about the new language model of 3.8
http://ez.no/download/ez_publish/changelogs/ez_publish_3_8/multi_language_features_for_the_content_model
I understand why my fetch funtions behave differently. It says:

"The existing parameters only_translated and language to the fetch functions content/list, content/tree, content/list_count and content/tree_count are deprecated since they are not valid anymore."

Still, this presents with me with several problems. For my multilingual site, I have the following requirements:

1. Articles are written/translated in one or more languages. On various index pages on my site, I only want to list those articles which are available in the language of the site access.

2. For each article, I want to provide links to the available other languages of that same article, if any. Following this link would show the same node in a different language ie. site access.

3. Articles can have related content, such as maps and images, which are created in one language and not translated, but still need to be shown next to the article in another language.

If I set ShowUntranslatedObjects=disabled, 1 is fulfilled, but not 2 and 3:
The contentobject attribute 'available_languages' does not contain the other languages of my object, even though they do exist. Related objects in another language are not shown.

If I set ShowUntranslatedObjects=enabled, 2 and 3 are fulfilled, but not 1:
Object are fetched in any language. The parameter only_translated=true() has no effect. I could use the 'language' parameter to limit the fetch to only one language, but then I have to find out the locale of the site access somehow.
The documentation article is a bit unclear about this. In the quote above it says that also the 'language' parameter is deprecated and no longer valid, but in the paragraph before that is says:
"The fetch function has a parameter called language which is an array of languages to act as the priority list (instead of the one defined in site-access)."

Marc Boon

Sunday 14 May 2006 11:47:30 am

After experimenting a bit with ShowUntranslatedObjects and SiteLanguageList settings, I observe the following:
If ShowUntranslatedObjects=disabled, $node.object.available_languages contains only those languages which are in SiteLanguageList *and* are actually available as translated objects.

eZ debug

Timing: Jan 30 2025 21:28:47
Script start
Timing: Jan 30 2025 21:28:47
Module start 'content'
Timing: Jan 30 2025 21:28:47
Module end 'content'
Timing: Jan 30 2025 21:28:48
Script end

Main resources:

Total runtime0.4321 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 588.1953370.2656
Module start 'content' 0.00630.0166 958.46091,001.6719
Module end 'content' 0.02290.4092 1,960.13283,890.1172
Script end 0.4321  5,850.2500 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00471.0992200.0002
Check MTime0.00130.3075200.0001
Mysql Total
Database connection0.00060.143510.0006
Mysqli_queries0.319173.85571410.0023
Looping result0.00190.43521390.0000
Template Total0.408794.610.4087
Template load0.00090.198810.0009
Template processing0.407894.376610.4078
Override
Cache load0.00060.138410.0006
Sytem overhead
Fetch class attribute can translate value0.00180.417010.0018
XML
Image XML parsing0.00020.057410.0002
General
dbfile0.01313.0284200.0007
String conversion0.00000.000930.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs