Fetch object_id problem

Author Message

Ricardo Lindooren

Thursday 27 February 2003 4:38:25 am

Hello,

I’m having a problem with the following code:

{let test=fetch('content',object,hash(object_id,217))}
{$test|attribute(show,1)}
{/let}

When I use this code it returns data of a completely different (not even related) object.

I want to use this to retrieve the name of an object with a specific id-number.

Can somebody help me with this?

Thanks in advance,

Ricardo Lindooren

P.S.: I’m using eZ publish 3 release candidate 2

Jan Borsodi

Thursday 27 February 2003 6:56:41 am

> Hello,
>
> I’m having a problem with the following code:
>
> {let test=fetch('content',object,hash(object_id,217))}
> {$test|attribute(show,1)}
> {/let}
>
> When I use this code it returns data of a completely
> different (not even related) object.
>
> I want to use this to retrieve the name of an object with a
> specific id-number.
>
> Can somebody help me with this?

Are you sure the ID is an Object ID and not a Node ID?
The Object ID is the one used in content/edit while the Node ID is the one used for content/view.

>
> Thanks in advance,
>
> Ricardo Lindooren
>
> P.S.: I’m using eZ publish 3 release candidate 2

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Ricardo Lindooren

Thursday 27 February 2003 7:08:33 am

>> Hello,
>>
>> I’m having a problem with the following code:
>>
>> {let test=fetch('content',object,hash(object_id,217))}
>> {$test|attribute(show,1)}
>> {/let}
>>
>> When I use this code it returns data of a completely
>> different (not even related) object.
>>
>> I want to use this to retrieve the name of an object with a
>> specific id-number.
>>
>> Can somebody help me with this?
>
> Are you sure the ID is an Object ID and not a Node ID?
> The Object ID is the one used in content/edit while the Node
> ID is the one used for content/view.

You're right. I'm using a Node ID instead of an Object ID.
Now I understand why it didn't work.

Thank you for your helpfull input.

Ricardo Lindooren

Thursday 27 February 2003 7:11:01 am

> > Hello,
> >
> > I’m having a problem with the following code:
> >
> > {let test=fetch('content',object,hash(object_id,217))}
> > {$test|attribute(show,1)}
> > {/let}
> >
> > When I use this code it returns data of a completely
> > different (not even related) object.
> >
> > I want to use this to retrieve the name of an object with
> a
> > specific id-number.
> >
> > Can somebody help me with this?
>
> Are you sure the ID is an Object ID and not a Node ID?
> The Object ID is the one used in content/edit while the Node
> ID is the one used for content/view.

You're right. I'm using a Node ID instead of an Object ID.
Now I understand why it didn't work.

Thank you for your helpfull input.

Ricardo Lindooren

Thursday 27 February 2003 7:15:05 am

>> Hello,
>>
>> I’m having a problem with the following code:
>>
>> {let test=fetch('content',object,hash(object_id,217))}
>> {$test|attribute(show,1)}
>> {/let}
>>
>> When I use this code it returns data of a completely
>> different (not even related) object.
>>
>> I want to use this to retrieve the name of an object with a
>> specific id-number.
>>
>> Can somebody help me with this?
>
> Are you sure the ID is an Object ID and not a Node ID?
> The Object ID is the one used in content/edit while the Node
> ID is the one used for content/view.

You're right. I'm using a Node ID instead of an Object ID.
Now I understand why it didn't work.

Thank you for your helpfull input.

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 30 2025 21:22:13
Script start
Timing: Jan 30 2025 21:22:13
Module start 'layout'
Timing: Jan 30 2025 21:22:13
Module start 'content'
Timing: Jan 30 2025 21:22:15
Module end 'content'
Timing: Jan 30 2025 21:22:15
Script end

Main resources:

Total runtime1.2229 sec
Peak memory usage8,192.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.1484151.2109
Module start 'layout' 0.00550.0043 739.3594220.6875
Module start 'content' 0.00981.2123 960.04694,479.4141
Module end 'content' 1.22200.0009 5,439.460915.8594
Script end 1.2229  5,455.3203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.3004160.0002
Check MTime0.00130.1028160.0001
Mysql Total
Database connection0.00070.056810.0007
Mysqli_queries1.106090.4391630.0176
Looping result0.00080.0662610.0000
Template Total1.157694.720.5788
Template load0.00180.147020.0009
Template processing1.155894.508120.5779
Template load and register function0.00190.151910.0019
states
state_id_array0.00230.186210.0023
state_identifier_array0.00160.134320.0008
Override
Cache load0.00180.14581090.0000
Sytem overhead
Fetch class attribute can translate value0.00180.149620.0009
Fetch class attribute name0.00250.204460.0004
XML
Image XML parsing0.00070.053820.0003
class_abstraction
Instantiating content class attribute0.00000.001160.0000
General
dbfile0.00480.3892170.0003
String conversion0.00000.000640.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
10content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 29
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs