Fetch doesn't return objects of my own class

Author Message

Marcus Ilgner

Wednesday 26 November 2003 1:36:43 am

Hi all,

I have a problem concerning fetch(). For the "Contact"-section of our website I created a class called "employee" (id 14) and put a number of employee-objects in the content structure.
But when I try to display them, fetch() doesn't return them. I tried to put an "article"-object in the same folder and search for article-class objects which worked fine.
The code below doesn't work for finding "employee"-type objects but when I replace '14' with '2' it successfully finds "article"-type objects.

{let employees=fetch( content, list_count, hash( parent_node_id, $:item.node_id,
sort_by, array(published,false()),
class_filter_type, include,
class_filter_array, array(14) ))}

Can anyone tell me what I might have done wrong? Do I have to register a new class somewhere? Assign it to a section? Do whatsoever? But then creating of new employee-objects works fine... and I can see them in the admin-interface.

Greetings
Marcus

Claus Jensen

Wednesday 26 November 2003 1:53:34 am

Hi Marcus,
if this fetch manages to fetch articles and not your class, maybe you forgot to set the rights for your class? Most normal problem for this kind of behaviour, done it myself a couple of times ;)

regards,
claÜs

Marcus Ilgner

Wednesday 26 November 2003 3:07:14 am

Hi Claus,

thanks for your reply! It saved my day...
Got it working all right now.

Greetings
Marcus

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 18:29:51
Script start
Timing: Jan 18 2025 18:29:51
Module start 'layout'
Timing: Jan 18 2025 18:29:51
Module start 'content'
Timing: Jan 18 2025 18:29:52
Module end 'content'
Timing: Jan 18 2025 18:29:52
Script end

Main resources:

Total runtime0.8087 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 588.0469152.6406
Module start 'layout' 0.00610.0029 740.687539.4766
Module start 'content' 0.00900.7981 780.1641475.1328
Module end 'content' 0.80710.0015 1,255.29698.1250
Script end 0.8086  1,263.4219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.4549160.0002
Check MTime0.00150.1815160.0001
Mysql Total
Database connection0.00100.125310.0010
Mysqli_queries0.760494.0301570.0133
Looping result0.00070.0806550.0000
Template Total0.773495.620.3867
Template load0.00290.356420.0014
Template processing0.770595.277720.3852
Template load and register function0.00010.013610.0001
states
state_id_array0.00130.154810.0013
state_identifier_array0.00140.169920.0007
Override
Cache load0.00230.2813250.0001
Sytem overhead
Fetch class attribute can translate value0.00060.080220.0003
Fetch class attribute name0.00100.129630.0003
XML
Image XML parsing0.00030.034720.0001
class_abstraction
Instantiating content class attribute0.00000.000930.0000
General
dbfile0.00070.0924100.0001
String conversion0.00000.000940.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 21
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs