[Zope] manage_addProperty(...) failure on DTMLDocuments
Felipe Barousse Boué
fbarousse@piensa.com
04 Apr 2003 18:50:53 -0600
--=-38luRMeeyvRDaw91B9pm
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
Hi all:
This is all on Zope-2.6.1 binary install on Linux.
It seems that manage_addProperty() is not working propperly when
indirectly applied to an instance of a DTMLDocument (case "A" below)
whilst it works fine when an explicit instance od the DTMLDocument is
used (case "B").
Having the following structure:
root-
folderA
Working Example "A":
<dtml-call "REQUEST.set('item',REQUEST.field1)">
<dtml-with
"folderA.manage_addProduct['OFSP'].manage_addDTMLDocument(item,
nombre)">
<dtml-call
"folderA[item].propertysheets.manage_addProperty('costo_frec',
costo_frec, 'string', REQUEST=3DNone)">
</dtml-with>
Troubled Example "B":
<dtml-call "REQUEST.set('item',REQUEST.field1)">
<dtml-with "manage_addProduct['OFSP'].manage_addDTMLDocument(item,
nombre)">
<dtml-call "REQUEST.item.propertysheets.manage_addProperty('costo_frec',
costo_frec, 'string', REQUEST=3DNone)">
</dtml-with>
Every time in case "A", the outcome is the same:
=20
Error Type: AttributeError
Error Value: propertysheets
Traceback (innermost last):
* Module ZPublisher.Publish, line 98, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 39, in call_object
* Module OFS.DTMLMethod, line 126, in __call__
* Module DocumentTemplate.DT_String, line 474, in __call__
* Module DocumentTemplate.DT_With, line 76, in render
* Module DocumentTemplate.DT_Util, line 201, in eval
__traceback_info__: None
* Module <string>, line 2, in f
AttributeError: propertysheets
manage_addProperty works fine if a "File" is the object added instead of
a DTMLDocument.
Has anyone encountered this behavior. I believe it is referenced in the
collector as issue # 444, (not sure tough).=20
Comments are welcome, thanks in advance.
Felipe Barousse
--=-38luRMeeyvRDaw91B9pm
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQA+jihsLAvKgbXVX78RAgdPAJ9Ts0Maio1Gvm3Qy+jjE8Xa4gkX2gCeMAsT
rq+r+VI6sBEFkX9FNvAQAnk=
=gabU
-----END PGP SIGNATURE-----
--=-38luRMeeyvRDaw91B9pm--