[Zope] New ZCatalog Error ?

Francois-regis Chalaoux Francois-regis.Chalaoux@sanofi-synthelabo.com
Tue, 10 Jul 2001 18:27:24 +0200


Hi,


Trying to use a ZCatalog to catalog a folder containig different types of document I found the an error.
I would like to stress that this error come from a DTML Method (named summary) and that this method is not call by any DTML Document I want to catalog !!!
Yes, I just want to catalog DTML Documents (as I choosed in Find Objects menu) not the DTML Method !!!
I reproduced this error on Zope 2.3.(2 and 3) and Zope 2.4b3
I saw this type of errors in the mailing list before Zope 2.4b3 but the problem seems to persist if it is.

Bye, FR.

Here is the summary method
==========================
<dtml-with "PARENTS[0]">
  <dtml-in "mRNA.report.objectValues('DTML Document')">
    <dtml-if "title=='summary'">
      <dtml-var sequence-item>
    </dtml-if>
   </dtml-in>
</dtml-with>

Here is the Zope Error
===================

<h2>Zope Error</h2>
  <p>Zope has encountered an error while publishing this resource.</p>
  
  <p>
  <strong>Error Type: NameError</strong><br>
  <strong>Error Value: global name 'PARENTS' is not defined</strong><br> 
  </p>
 
  <hr noshade>
 
  <p>Troubleshooting Suggestions</p>

  <ul>
    <li>This resource may be trying to reference a
  nonexistent object or variable <strong>global name 'PARENTS' is not defined</strong>.</li>
    <li>The URL may be incorrect.</li>
  <li>The parameters passed to this resource may be incorrect.</li>
  <li>A resource that this resource relies on may be encountering an error.</li>
  </ul>

  <p>For more detailed information about the error, please
  refer to the HTML source for this page.
  </p>

  <p>If the error persists please contact the site maintainer.
  Thank you for your patience.
  </p>
</td></tr>
</table>


</BODY></HTML>

<!--
Traceback (innermost last):
  File C:?PROGRA~1?WEBSIT~1?lib?python?ZPublisher?Publish.py, line 223, in publish_module
  File C:?PROGRA~1?WEBSIT~1?lib?python?ZPublisher?Publish.py, line 187, in publish
  File C:?PROGRA~1?WEBSIT~1?lib?python?Zope?__init__.py, line 226, in zpublisher_exception_hook
    (Object: LockableItem)
  File C:?PROGRA~1?WEBSIT~1?lib?python?ZPublisher?Publish.py, line 171, in publish
  File C:?PROGRA~1?WEBSIT~1?lib?python?ZPublisher?mapply.py, line 160, in mapply
    (Object: manage_catalogFoundItems)
  File C:?PROGRA~1?WEBSIT~1?lib?python?ZPublisher?Publish.py, line 112, in call_object
    (Object: manage_catalogFoundItems)
  File C:?PROGRA~1?WEBSIT~1?lib?python?Products?ZCatalog?ZCatalog.py, line 385, in manage_catalogFoundItems
    (Object: LockableItem)
  File C:?PROGRA~1?WEBSIT~1?lib?python?Products?ZCatalog?ZCatalog.py, line 713, in ZopeFindAndApply
    (Object: LockableItem)
  File C:?PROGRA~1?WEBSIT~1?lib?python?Products?ZCatalog?ZCatalog.py, line 713, in ZopeFindAndApply
    (Object: LockableItem)
  File C:?PROGRA~1?WEBSIT~1?lib?python?Products?ZCatalog?ZCatalog.py, line 713, in ZopeFindAndApply
    (Object: LockableItem)
  File C:?PROGRA~1?WEBSIT~1?lib?python?Products?ZCatalog?ZCatalog.py, line 713, in ZopeFindAndApply
    (Object: LockableItem)
  File C:?PROGRA~1?WEBSIT~1?lib?python?Products?ZCatalog?ZCatalog.py, line 701, in ZopeFindAndApply
    (Object: LockableItem)
  File C:?PROGRA~1?WEBSIT~1?lib?python?Products?ZCatalog?ZCatalog.py, line 484, in catalog_object
    (Object: LockableItem)
  File C:?PROGRA~1?WEBSIT~1?lib?python?Products?ZCatalog?Catalog.py, line 387, in catalogObject
  File C:?PROGRA~1?WEBSIT~1?lib?python?Products?ZCatalog?Catalog.py, line 500, in recordify
  File C:?PROGRA~1?WEBSIT~1?lib?python?OFS?DTMLMethod.py, line 187, in __call__
    (Object: summary)
  File C:?PROGRA~1?WEBSIT~1?lib?python?DocumentTemplate?DT_String.py, line 544, in __call__
    (Object: summary)
  File C:?PROGRA~1?WEBSIT~1?lib?python?DocumentTemplate?DT_With.py, line 133, in render
    (Object: PARENTS[0])
  File C:?PROGRA~1?WEBSIT~1?lib?python?DocumentTemplate?DT_Util.py, line 230, in eval
    (Object: PARENTS[0])
    (Info: PARENTS)
  File &lt;string&gt;, line 2, in f
    (Object: guarded_getitem)
NameError: (see above)

-->