Forums / Developer / eZContentObject relatedContentObjectArray

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 ) )

eZ debug

Timing: Jan 17 2025 23:48:04
Script start
Timing: Jan 17 2025 23:48:04
Module start 'content'
Timing: Jan 17 2025 23:48:05
Module end 'content'
Timing: Jan 17 2025 23:48:05
Script end

Main resources:

Total runtime0.8539 sec
Peak memory usage4,096.0000 KB
Database Queries189

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 588.9609180.8125
Module start 'content' 0.00700.7298 769.7734438.2266
Module end 'content' 0.73680.1171 1,208.0000333.7813
Script end 0.8538  1,541.7813 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.4192210.0002
Check MTime0.00140.1661210.0001
Mysql Total
Database connection0.00070.084710.0007
Mysqli_queries0.791692.70561890.0042
Looping result0.00150.17001870.0000
Template Total0.831097.320.4155
Template load0.00180.213020.0009
Template processing0.829297.105020.4146
Template load and register function0.00010.015010.0001
states
state_id_array0.00030.036110.0003
state_identifier_array0.00080.098120.0004
Override
Cache load0.00160.1872560.0000
Sytem overhead
Fetch class attribute can translate value0.00090.107720.0005
Fetch class attribute name0.00110.126620.0005
XML
Image XML parsing0.00060.065920.0003
class_abstraction
Instantiating content class attribute0.00000.000620.0000
General
dbfile0.00150.1771210.0001
String conversion0.00000.000730.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs