[Zope] ZTopics not working right --Error Value: Vocabulary

Tres Seaver tseaver@digicool.com
Wed, 29 Nov 2000 21:07:53 -0500


Umesh Soni <u.soni@cs.ucl.ac.uk> wrote:
 
> Hi I am trying to use ZTopics to create a visual hierarchy. I've
> got ZTopics installed ok but I am having problems with using them.
> 
> If I create a top level ZTopic all is well and the ztopic will filter
> my catalog fine. However, if I try to create a hierarchy -even if
> only one level deep, I get the following error.
> 
> Error Type: AttributeError
> Error Value: Vocabulary
> 
> Traceback (innermost last):
>   File /usr/local/Zope-2.2.4b1-src/lib/python/ZPublisher/Publish.py, line 222, in publish_module
>   File /usr/local/Zope-2.2.4b1-src/lib/python/ZPublisher/Publish.py, line 187, in publish
>   File /usr/local/Zope-2.2.4b1-src/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook
>     (Object: Traversable)
>   File /usr/local/Zope-2.2.4b1-src/lib/python/ZPublisher/Publish.py, line 171, in publish
>   File /usr/local/Zope-2.2.4b1-src/lib/python/ZPublisher/mapply.py, line 160, in mapply
>     (Object: index_html)
>   File /usr/local/Zope-2.2.4b1-src/lib/python/ZPublisher/Publish.py, line 112, in call_object
>     (Object: index_html)
>   File /usr/local/Zope-2.2.4b1-src/lib/python/OFS/DTMLMethod.py, line 172, in __call__
>     (Object: index_html)
>   File /usr/local/Zope-2.2.4b1-src/lib/python/DocumentTemplate/DT_String.py, line 528, in __call__
>     (Object: index_html)
>   File /usr/local/Zope-2.2.4b1-src/lib/python/Products/ZTopic/Topic.py, line 180, in contents
>     (Object: Traversable)
>   File /usr/local/Zope-2.2.4b1-src/lib/python/Products/ZTopic/Topic.py, line 228, in _contentsSet
>     (Object: Traversable)
>   File /usr/local/Zope-2.2.4b1-src/lib/python/SearchIndex/UnTextIndex.py, line 401, in _apply_index
>   File /usr/local/Zope-2.2.4b1-src/lib/python/SearchIndex/UnTextIndex.py, line 476, in query
>   File /usr/local/Zope-2.2.4b1-src/lib/python/SearchIndex/UnTextIndex.py, line 196, in getLexicon
> AttributeError: (see above)
> 
> I haven't a clue if the problem is with ZTopics or the lexicon stuff
> within zope.
> 
> Anyone know what's going on here?

Chris McDonough <chrism@digicool.com> responded:

> From what I remember, the TextIndex code wants to acquire the catalog's
> Vocabulary subobject.  If you created your catalog without a Vocabulary (I
> think this is an option during the instantiation of a catalog), this can
> occur.  This is arguably a bug.  The vocabulary object should probably not
> be acquired.  Do you think you can submit this to the "Collector" at
> Zope.org (http://classic.zope.org:8080/Collector)?


Umesh replied:

> The catalog in question is the portal_catalog from the PTK which has
> an accompaning Vocabulary object.
> 
> I will do as you requested and submit this to the Collector.
> 
> umesh
> 
> btw. I had to apply the following patch to ZTopic to rectify a
> mis-behaving user interface.
> 
> --- topicEdit.dtml.old  Wed Nov 29 10:49:53 2000
> +++ topicEdit.dtml      Wed Nov 29 09:16:02 2000
> @@ -35,8 +35,8 @@
> 
>      <TR>
>         <TD align="left" COLSPAN="2">
> -       <input type="submit" name="../editSearchForm:method" value="Edit">
> -       <input type="submit" name="../deleteSearch:method" value="Delete">
> +       <input type="submit" name="editSearchForm:method" value="Edit">
> +       <input type="submit" name="deleteSearch:method" value="Delete">
>         </TD>
>         </TR>
>    </table>

The 'portal_catalog' object is actually a wrapper around a
standard ZCatalog instance.  I would look at 
'ZTopics.Topic._contentsSet()' to see what it is trying to
do with the catalog.  I would log also log this as a PTK issue:

  http://www.zope.org/Products/PTK/Tracker

rather than in the Collector (I don't believe it is a Zope
issue, per se).

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@digicool.com
Digital Creations     "Zope Dealers"       http://www.zope.org