eZContentObject relatedContentObjectArray

Author Message

Lucas Aguilar

Thursday 06 May 2010 5:41:05 am

Dear, good morning, I commented:
'm trying to get objects related to this php code:

$ IdObjTramitesDestacados = 2214
$ ObjTramimesDestacados = & eZContentObject:: fetch ($ idObjTramitesDestacados)
$ArrayObjRelacionados = $objTramimesDestacados-> relatedContentObjectArray ();

print_r ($objTramimesDestacados)
print_r ($arrayObjRelacionados)


foreach ($arrayObjRelacionados as $tramite_relacionado) (
echo '<br> processed:'. $tramite_relacionado;
)

And do not return anything ... observation if I use the method:
echo ('<br> Object ID:'. $ objTramimesDestacados-> ID);
echo ('Number of objects related <br>'. $ objTramimesDestacados-> relatedContentObjectCount ());

It returns the correct amount of related objects.

q know could be happening?
thanks

Lucas Aguilar

Thursday 06 May 2010 8:46:18 am

From this line "sql" query when the query is empty brings, such as repair it, is some language settings that I may be missing?.
He clarified that previously realized the steps from the 4.0.1 update to version 4.3
greetings and I hope some help.

This is the sql:

SELECT
ezcontentclass.serialized_name_list AS class_serialized_name_list,
ezcontentclass.identifier as contentclass_identifier,
ezcontentclass.is_container as is_container,
ezcontentobject.* , ezcontentobject_name.name as name, ezcontentobject_name.real_translation
FROM
ezcontentclass,
ezcontentobject,
ezcontentobject_link
, ezcontentobject_name
WHERE
ezcontentclass.id=ezcontentobject.contentclass_id
AND ezcontentclass.version=0
AND ezcontentobject.status=1
AND ezcontentobject_link.op_code='0'
AND ( relation_type & 7 ) <> 0
AND ezcontentobject.id=ezcontentobject_link.to_contentobject_id
AND ezcontentobject_link.from_contentobject_id='2214'
AND ezcontentobject_link.from_contentobject_version='10'
AND ezcontentobject.id = ezcontentobject_name.contentobject_id
AND ezcontentobject.current_version = ezcontentobject_name.content_version
AND ( ezcontentobject_name.language_id & ezcontentobject.language_mask > 0
*/If you remove this last part brings the right data ... */

AND ( ( ezcontentobject.language_mask - ( ezcontentobject.language_mask & ezcontentobject_name.language_id ) ) & 1 )
< ( ezcontentobject_name.language_id & 1 ) )

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

Main resources:

Total runtime0.0165 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 588.0469152.6406
Module start 'layout' 0.00590.0030 740.687539.4766
Module start 'content' 0.00880.0050 780.164189.2578
Module end 'content' 0.01390.0026 869.421930.3047
Script end 0.0164  899.7266 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002716.1841140.0002
Check MTime0.00116.6240140.0001
Mysql Total
Database connection0.00116.778710.0011
Mysqli_queries0.002917.651430.0010
Looping result0.00000.114210.0000
Template Total0.001911.710.0019
Template load0.00095.317110.0009
Template processing0.00106.324710.0010
Override
Cache load0.00063.455110.0006
General
dbfile0.00021.452980.0000
String conversion0.00000.060740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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