Re: WG: AttributeError: aq_parent on images in Data table (on ZMS content root object)
Niels Dettenbach <[email protected]> Wed, 02 Nov 2011 15:28:22 +0100
| Newsgroups | gmane.comp.cms.zms.devel |
|---|---|
| Organization | Syndicat IT&Internet |
| Message-ID | <25918740.sheagNPhAt@gongo> |
Dear Mr. Hoffmann,
dear list users,
Am Freitag, 21. Oktober 2011, 17:03:26 schrieben Sie:
> Hello,
> I am sorry for being unable to reproduce the error (screen shot ZMS #1699,
> ZMSTable 1.6.2). Did you put prgrammierung code into a table cell?
> Hint: complex tables are produced via wysiwyg editor much easier.
...just to add and clearify further, as we still have a misunderstanding here and we are not taliking about ZMSTable or HTML tables here:
To clearify the situation i produced some screenshots which shows the bug in practice and i've exported the object structure here:
http://www.syndicat.com/pub/zms/bugs/aq_parent_bug/
It seems the href could not get rendered as the getHref() has a problem to calculate with a proper aq_parent.
To explain:
========
I've created a object ("Hintergrundbilder") type data table ("Datentabelle"):
http://www.syndicat.com/pub/zms/bugs/aq_parent_bug/kw_images-0.6.0.metaobj.xml
which holds a data-table ("Datentabelle") consisting of the row id, a integer and a image (blob) - seems like:
http://www.syndicat.com/pub/zms/bugs/aq_parent_bug/screen_1.png
and extended the ZMS Site object with this object:
http://www.syndicat.com/pub/zms/bugs/aq_parent_bug/screen_0_ZMS-Site-Eigenschaften.png
if someone clicks on the edit symbol of a row within the data table, the editing formular to edit the row is rendered, but instead of the image a error somes out:
http://www.syndicat.com/pub/zms/bugs/aq_parent_bug/screen_2_Datensatz_bearbeiten.png
The same happens if i try to access the image from i.e. dtml anywhere with i.e.: img.getHref(REQUEST) (img is the image object - see full code above).
From my view this is a bug within current ZMS so far.
--- snip ---
<dtml-let doc="content">
<dtml-let weekofyear="DateTime().week()">
<dtml-let images="filter_list(doc.bg_images_zms.getObjProperty('records',REQUEST),'kw_id',weekofyear)">
<dtml-if images>
<dtml-in images mapping>
<dtml-call "REQUEST.set('img',kw_image)">
</dtml-in>
<dtml-else>
<dtml-call "REQUEST.set('img',doc.getObjProperty('bg_image_default',REQUEST))">
</dtml-if>
</dtml-let>
</dtml-let>
</dtml-let>
<img id="background" src="<dtml-var "img.getHref(REQUEST)">" border="0" alt="Hintergrund" />
--- snap ---
Many thanks for any solution here.
hth
best regards,
Niels.
---
Niels Dettenbach
Syndicat IT&Internet
http://www.syndicat.com/
signature.asc
(application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iQIcBAABCAAGBQJOsVOLAAoJEM78prARigUnxewP+wSV2Iwc1bXwupnUHpaFKjmk aVJWf9ICnNjzXktXYMzYAJ90wHFaho5RjBxu2KpzCxQFBUKTCEBESPi5Ng9f9McF ZbgGjBOJVldy6XMe6wwf0YVfg8BBStSTeND4pOEWPjuTwRNsKb2rxXMj+YIWaza/ pKuSOS7uE6lqDqEDGrzoNGCoOWq1rkaxAjzz7Yo/h5LioU1WXdvDDkKqMNhI8bws m/tp3BfBAuWZBe1WnO+322FYrRQffnUoqzkDQBxLid+3LaLseYW6zjWyhcXcuFHZ 14yMXo1x8RDGcJbqknvJzTUl3L9QuMPuXk66PY622TbxvuaSXBZjxEKjmnQSUURJ omrqu2Z4Uo8O4fL4iuRqk1Z+yK35x99KM9x/RCKb9m+kRrL+INw4L0WTDJJSAnCv OB07TmaIuaVsHERIQCsyCPFktzZLlBF+iQp+kkEMAaWOSo4T/y/hsbyk2cbI7st0 tz4exLqvlDhni8z9sJgHrKZA5EtqCAgpayQfn8c02jfBsP6bQs/e7bzdqvv7OPla nCUaaj+95C36EHrJfBn38fXczmI9HBKH+X+qAP4NhpB3bCTi3qREl7lej3v89xBX IsxYQSiJu07oGpCPyF/oK4qd+bAeVSovEqpkN/KgNj87TbKapPRMlsYQ2FA4NhbA 94qc5zS5GNGWnQ92HczF =ZKVG -----END PGP SIGNATURE-----