fetch content list and always available option

Author Message

Nathalie Grimaud

Wednesday 07 January 2009 3:53:53 am

Hi,
When I do a fetch content list (without any special option on the language) on a node where some children are not translated I always obtain the same result set: all the children are displayed.

Even if I uncheck the "Use the main language if there is no prioritized translation" option the untranslated children are still returned.

Is this a bug (found this in 3.9.2 and 4.0.1) or did I miss something?

Thanks
Nathalie

André R.

Wednesday 07 January 2009 4:14:02 am

Also looked at the class to see if "Default object availability" is enabled?

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Nathalie Grimaud

Wednesday 07 January 2009 4:22:17 am

Hi André,

In the content class the "Default object availability" option is set to "Not available"...

André R.

Wednesday 07 January 2009 4:35:24 am

Whats the language settings for the siteaccess your doing this on?
Post the whole 'RegionalSettings' and 'ContentSettings' settings block from site.ini.append.php in your siteaccess settings.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Nathalie Grimaud

Wednesday 07 January 2009 5:00:43 am

Here are the settings for the fr siteaccess

[RegionalSettings]
Locale=fre-FR
ContentObjectLocale=fre-FR
SiteLanguageList[]
SiteLanguageList[]=fre-FR
SiteLanguageList[]=eng-GB
TextTranslation=enabled

I did not override the default ContentSettings block

Stéphane Bullier

Thursday 08 January 2009 12:48:17 am

Hello,

I have same parameters in my site.ini file for fr siteaccess.

This is my site.ini file for en siteaccess :

[RegionalSettings]
Locale=eng-GB
ContentObjectLocale=eng-GB
SiteLanguageList[]=eng-GB
ShowUntranslatedObjects=disabled
TextTranslation=disabled

Stéphane

Nathalie Grimaud

Thursday 08 January 2009 2:34:50 am

Hello Stéphane,

Thanks for your contribution ; I have the same settings for my en siteaccess.

I still don't understand why in my fr siteaccess the fetch content list always return all the children nodes whatever the always available option is for an untranslated child.

Stéphane Bullier

Thursday 08 January 2009 3:24:24 am

Have you check your file settings/override/iste.ini.append.php ?

There is nothing about [RegionalSettings] ?

Stéphane

André R.

Thursday 08 January 2009 3:36:15 am

What languages do you have? And what is the 'bug' here, your settings define that both fr and en languages are fetched. And you haven't defined ShowUntranslatedObjects so make sure it is disabled for your front end site access (and overwritten by override/extensions settings).

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Nathalie Grimaud

Friday 09 January 2009 6:46:25 am

Thanks Stéphane and André for your help, I've finally got the solution.
The problem was that I misunderstood the "untranslated" notion.

For me a node was untranslated if it did not exist in the current siteaccess language (fre-FR).
But now I understood that a node is actually untranslated when it does not exist in <b>any</b> of the languages defined in the SiteLanguageList[] setting for the current siteaccess (fre-FR + eng-GB).

In my case all the nodes existed in English so they were always all considered as translated and thereby always displayed whatever the "always available" option value was.

So here is the solution if this can help someone : just remove eng-GB from the SiteLanguageList[] and simply use the "always available" checkbox to display the node or not.

Thanks again,
Nathalie

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 11:36:26
Script start
Timing: Jan 18 2025 11:36:26
Module start 'layout'
Timing: Jan 18 2025 11:36:26
Module start 'content'
Timing: Jan 18 2025 11:36:27
Module end 'content'
Timing: Jan 18 2025 11:36:27
Script end

Main resources:

Total runtime0.6977 sec
Peak memory usage4,096.0000 KB
Database Queries80

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0098 588.0469152.6406
Module start 'layout' 0.00980.0034 740.687539.4922
Module start 'content' 0.01320.6829 780.1797661.0391
Module end 'content' 0.69610.0016 1,441.218820.1250
Script end 0.6977  1,461.3438 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.5618160.0002
Check MTime0.00140.2073160.0001
Mysql Total
Database connection0.00170.237410.0017
Mysqli_queries0.617488.4902800.0077
Looping result0.00130.1873780.0000
Template Total0.654893.820.3274
Template load0.00220.309820.0011
Template processing0.652693.532920.3263
Template load and register function0.00030.038710.0003
states
state_id_array0.00170.245510.0017
state_identifier_array0.00160.223920.0008
Override
Cache load0.00190.2772490.0000
Sytem overhead
Fetch class attribute can translate value0.00060.087030.0002
Fetch class attribute name0.00220.3188120.0002
XML
Image XML parsing0.00110.163730.0004
class_abstraction
Instantiating content class attribute0.00010.0083150.0000
General
dbfile0.00120.1712230.0001
String conversion0.00000.001340.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
10content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
14content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 39
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs