(newbie) Why can't I see my new class?

Author Message

Iris Hoekstra - Roscam Abbing

Friday 13 February 2004 6:49:47 am

I have made a new class called 'Remark'. It has two attributes of the 'textline' type. I have given the 'Anonymous user' permission to see it. I have made an object with the class, which has node id 71.

Then I pasted this into the template for my web page:
{let remark = fetch( 'content', 'node', hash(node_id, 71))}
{node_view_gui view=line content_node=$remark}
{/let}

The rest of the template (i.e. the plain html) looks good.

I have also made a template which overrides node/view/line.tpl for all objects with class id 14. I have checked and re-checked: 'Remark' really has ID 14. The template looks like this:
<div class="remark">
{attribute_view_gui attribute=$node.object.data_map.bodytext}
</div>

Still, I am not seeing the object in my web page. What on earth am I doing wrong?

Balazs Halasy

Friday 13 February 2004 7:11:43 am

Hi,

At the first & quick glance, your technique & template code looks okay. But..

1)
I'm not sure about the whitespace adjacent to your first equal sign. Try to remove these spaces.

2)
Do a {$remark|attribute('show')} before your node_view_gui line in order to see if the node was fetched or not.

3)
Turn on debugging and check if there are any errors that might be related to your problem.

Hope this helps.

Balazs

Ole Morten Halvorsen

Friday 13 February 2004 7:16:04 am

My bad, ignore this message.
Must be getting late :)

- ingore -
Also, the anonymous user does not have permission to new classes by default.
Go to the admin interface -> user -> roles and add read permission to the anonymous role for your new class if you haven't done that already.

Ole

Senior Software Engineer - Vision with Technology

http://www.visionwt.com
http://www.omh.cc
http://www.twitter.com/omh

eZ Certified Developer
http://ez.no/certification/verify/358441
http://ez.no/certification/verify/272578

Iris Hoekstra - Roscam Abbing

Friday 13 February 2004 7:40:32 am

Wow, you guys are really fast!

When I do: {$remark|attribute('show')} the whole screen fills up with a ton of attributes. Looks okay to me.

Debug info looks like this:

Error: eZContentObjectVersion Feb 13 2004 16:29:55
Undefined attribute 'can_read', cannot get
Error: eZContentObject::fetch() Feb 13 2004 16:29:55
Object not found

Still mystified...

Balazs Halasy

Friday 13 February 2004 7:47:35 am

Of course we're fast... :-)

OK, try this:
Check the debug dump for error related to template files that could not be included. Try searching for ".tpl" or "template" within the debug.

OR:

Remove the template override, clear ALL caches and see what happens when you try to load the page. It should pop up with the standard line template. You should be able to see the name of the node, etc.

Balazs

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 31 2025 06:09:32
Script start
Timing: Jan 31 2025 06:09:32
Module start 'layout'
Timing: Jan 31 2025 06:09:32
Module start 'content'
Timing: Jan 31 2025 06:09:32
Module end 'content'
Timing: Jan 31 2025 06:09:32
Script end

Main resources:

Total runtime0.0184 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.0063 588.2578151.2266
Module start 'layout' 0.00630.0025 739.484436.6641
Module start 'content' 0.00880.0081 776.148494.1406
Module end 'content' 0.01690.0016 870.289137.9922
Script end 0.0184  908.2813 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002613.8452140.0002
Check MTime0.00105.6115140.0001
Mysql Total
Database connection0.00168.873410.0016
Mysqli_queries0.00189.981030.0006
Looping result0.00000.120210.0000
Template Total0.00126.710.0012
Template load0.00095.101010.0009
Template processing0.00031.561210.0003
Override
Cache load0.00063.382110.0006
General
dbfile0.002613.999080.0003
String conversion0.00000.042640.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