Re: [zms-developers] AttributeError: aq_parent on images in Data table (on ZMS content root object)
- Am Freitag, 21. Oktober 2011, 15:06:03 schrieben Sie:
> If no one has a similiar problem i assume it is affected by anything withinJust in addition:
> my setup here.
sorry for coming back with this again, but it seems there still is a small bug in the current tree here. I've further investigated with todays current that my code should be correct, as i still get parameters of the image blob - like i.e.:
but if i call a
i still get a
--- snip ---
in File "/var/zope/abc/Products/zms/_blobfields.py", line 735, in getHref parent = self.aq_parent AttributeError: aq_parent
--- snap ---
again (as in older versions of 2.13).
Here is the code i use (i have a table of 52 images by kw_id - one image per week of the year) and want to show another image each week of year in this case:
<dtml-in images mapping>
<dtml-let image="formatObjAttrValue(getObjAttr('kw_image'),kw_image, lang)">
May be this is a likely hidden bug as not much users may use table objects on the ZMS object (ZMS root) - we may solve this by workarounds like using 1-n objects instead of a table, but for proper functionality and completeness this should work too i think.
Unfortunately i can't figure out the problem within the ZMS code byself here and cant build the path byself from other parts (i.e. getFilename()) as i did not have the (changing) path......
May be someone will be faced to the same problem at some time in the future...