Forums / Setup & design / (newbie) Why can't I see my new class?

(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