"ElementWithAttributes" in result of absolute_url() (urgent)
I have created a python product which is a wrapper to the DTMLDocument class. I do overwrite the getProperty method because when properties are asked for from the object I pick the right ones depending on some other variables. Everything is working nicely except the absolute_url() method (which I don't override). Doing...: object = context.contentcontainerObject print object.absolute_url() print object.title_or_id() return printed Expected result: http://zigurat:8180/Projects/galdrionweb/omgaldrion/contentcontainerObject "The correct Title" Actual result: http://zigurat:8180/Projects/galdrionweb/omgaldrion/ElementWithAttributes "The correct Title" Does anybody know why this is? If you need for information I can give you that of course, but at the moment I have no idea what information I need to tell to solve this. Best regards, Peter PS. There seems to be no better result if I cross out the getProperty method.
Peter Bengtsson writes:
I have created a python product which is a wrapper to the DTMLDocument class. I do overwrite the getProperty method because when properties are asked for from the object I pick the right ones depending on some other variables. Everything is working nicely except the absolute_url() method (which I don't override).
Doing...: object = context.contentcontainerObject print object.absolute_url() print object.title_or_id() return printed
Expected result: http://zigurat:8180/Projects/galdrionweb/omgaldrion/contentcontainerObject "The correct Title"
Actual result: http://zigurat:8180/Projects/galdrionweb/omgaldrion/ElementWithAttributes "The correct Title"
Looks as if your instance had no id (which is called "__name__" for DTML objects. Dieter
Good morning. I tried to use the poll-tag product but...if i insert <dtml-poll> in standard-header or standard-footer i have a recursion error. Do you have a solution for it?? Thanks. Max
participants (3)
-
Dieter Maurer -
Peter Bengtsson -
TrashMan