Hi, I try to Find and Catalog inside the portal_catalog. I can't and the error below appears. I tried to do it, because when I use of this syntaxe : <dtml-let results=portal_catalog> <dtml-return search_view> </dtml-let> with param as : Type=Document Zope returns to me ALL the catalog !!!! It is the non logical error, I found when I get my Site.zexp under Zope 2.4.3 to export to my new site under Zope 2.5.1. What's happen ? -------------------------------------------------------------------- Type de l'erreur : KeyError Valeur de l'erreur : question Traceback (innermost last): File C:\Zope\ZopeSite\lib\python\ZPublisher\Publish.py, line 150, in publish_module File C:\Zope\ZopeSite\lib\python\ZPublisher\Publish.py, line 114, in publish File C:\Zope\ZopeSite\lib\python\Zope\__init__.py, line 159, in zpublisher_exception_hook (Object: portal_catalog) File C:\Zope\ZopeSite\lib\python\ZPublisher\Publish.py, line 98, in publish File C:\Zope\ZopeSite\lib\python\ZPublisher\mapply.py, line 88, in mapply (Object: manage_catalogFoundItems) File C:\Zope\ZopeSite\lib\python\ZPublisher\Publish.py, line 39, in call_object (Object: manage_catalogFoundItems) File C:\Zope\ZopeSite\lib\python\Products\ZCatalog\ZCatalog.py, line 330, in manage_catalogFoundItems (Object: portal_catalog) File C:\Zope\ZopeSite\lib\python\Products\ZCatalog\ZCatalog.py, line 709, in ZopeFindAndApply (Object: portal_catalog) File C:\Zope\ZopeSite\lib\python\Products\ZCatalog\ZCatalog.py, line 709, in ZopeFindAndApply (Object: portal_catalog) File C:\Zope\ZopeSite\lib\python\Products\ZCatalog\ZCatalog.py, line 709, in ZopeFindAndApply (Object: portal_catalog) File C:\Zope\ZopeSite\lib\python\Products\ZCatalog\ZCatalog.py, line 697, in ZopeFindAndApply (Object: portal_catalog) File C:\Zope\ZopeSite\lib\python\Products\CMFCore\CatalogTool.py, line 212, in catalog_object (Object: portal_catalog) File C:\Zope\ZopeSite\lib\python\Products\ZCatalog\ZCatalog.py, line 480, in catalog_object (Object: portal_catalog) File C:\Zope\ZopeSite\lib\python\Products\ZCatalog\Catalog.py, line 310, in catalogObject File C:\Zope\ZopeSite\lib\python\Products\ZCatalog\Catalog.py, line 423, in recordify File C:\Zope\ZopeSite\lib\python\OFS\DTMLMethod.py, line 120, in __call__ (Object: title) File C:\Zope\ZopeSite\lib\python\DocumentTemplate\DT_String.py, line 473, in __call__ (Object: title) File C:\Zope\ZopeSite\lib\python\DocumentTemplate\DT_Var.py, line 211, in render (Object: question) KeyError: (see above) ------------------------------------------------------------------ Sincerily PS -------------------------------------------------- Oreka ! Nous sommes l'internet moins cher ! Surfez 25% moins cher avec http://www.oreka.com
Pascal Samuzeau writes: Hm, do you have 2 problems? 1. a KeyError 2. an unexpected search result Your first problem:
I try to Find and Catalog inside the portal_catalog. I can't and the error below appears. ... 310, in catalogObject File C:\Zope\ZopeSite\lib\python\Products\ZCatalog\Catalog.py, line 423, in recordify File C:\Zope\ZopeSite\lib\python\OFS\DTMLMethod.py, line 120, in __call__ (Object: title) File C:\Zope\ZopeSite\lib\python\DocumentTemplate\DT_String.py, line 473, in __call__ (Object: title) File C:\Zope\ZopeSite\lib\python\DocumentTemplate\DT_Var.py, line 211, in render (Object: question) KeyError: (see above) The "title" field in your catalog's "Meta Data Table" is resolved into a DTML Method (named "title") for at least one of the objects to be catalogued. This DTML Method references a variable "question" which is not defined in the current context.
It is not a good idea, to name a DTML Method "title". Your second problem:
I tried to do it, because when I use of this syntaxe :
<dtml-let results=portal_catalog> <dtml-return search_view> </dtml-let>
with param as :
Type=Document
Zope returns to me ALL the catalog !!!! That is strange (and should not happen).
Apparently, the "portal_catalog" does not see the "Type" in the REQUEST. You are sure, it is there? Dieter
Hi Dieter, Your office is open 24 on 24 hours ? is'nt it ? Ok, I answer to you of the 2 response you sent to me kindly. 1 - a KeyError. It is very strange, for me and for you(I suppose), but I can ensure you that I have'nt a DTML Method named "type". To be sure I try to find a such object, but nowhere I can find it. 2 - an unexpected search result Yes it does exactly as I wrote you, but I give to you the exact link I send to my site : http://localhost/cerf/search?SearchableText=&Type%3Alist=Cas+clinique First I was thinking that the type "list" of my "Type" was suspect, but the ssame error appears without the type "list". Is there a way to "destroy" the entirely catalog and create a new one without lost any informations ? Sincerily PS -------------------
Pascal Samuzeau writes: Hm, do you have 2 problems?
1. a KeyError 2. an unexpected search result
Your first problem:
I try to Find and Catalog inside the portal_catalog.
I can't and the error below appears.
... 310, in catalogObject
File C:\Zope\ZopeSite\lib\python\Products\ZCatalog\Catalog.py, line 423, in recordify
File C:\Zope\ZopeSite\lib\python\OFS\DTMLMethod.py, line 120, in __call__
(Object: title)
File C:\Zope\ZopeSite\lib\python\DocumentTemplate\DT_String.py, line 473, in __call__
(Object: title)
File C:\Zope\ZopeSite\lib\python\DocumentTemplate\DT_Var.py, line 211, in render
(Object: question)
KeyError: (see above)
The "title" field in your catalog's "Meta Data Table" is resolved into a DTML Method (named "title") for at least one of the objects to be catalogued. This DTML Method references a variable "question" which is not defined in the current context.
It is not a good idea, to name a DTML Method "title".
Your second problem:
I tried to do it, because when I use of this syntaxe :
<dtml-let results=portal_catalog>
<dtml-return search_view>
</dtml-let>
with param as :
Type=Document
Zope returns to me ALL the catalog !!!!
That is strange (and should not happen).
Apparently, the "portal_catalog" does not see the "Type" in the REQUEST. You are sure, it is there?
Dieter
-------------------------------------------------- Oreka ! Nous sommes l'internet moins cher ! Surfez 25% moins cher avec http://www.oreka.com
Pascal Samuzeau writes:
1 - a KeyError.
It is very strange, for me and for you(I suppose), but I can ensure you that I have'nt a DTML Method named "type". To be sure I try to find a such object, but nowhere I can find it. It's not "type" but "title"!
2 - an unexpected search result
Yes it does exactly as I wrote you, but I give to you the exact link I send to my site :
http://localhost/cerf/search?SearchableText=&Type%3Alist=Cas+clinique
First I was thinking that the type "list" of my "Type" was suspect, but the ssame error appears without the type "list".
Is there a way to "destroy" the entirely catalog and create a new one without lost any informations ? In principle, yes. But it is a pain and it will probably not help you.
For some reason, your catalog does not recognize the "Type" as an index name (and therefore ignores it). May it be that you accidentally deleted the "Type" index?
.... line
423, in recordify
File C:\Zope\ZopeSite\lib\python\OFS\DTMLMethod.py, line 120, in __call__
(Object: title)
File C:\Zope\ZopeSite\lib\python\DocumentTemplate\DT_String.py, line 473, in __call__
(Object: title)
File C:\Zope\ZopeSite\lib\python\DocumentTemplate\DT_Var.py, line 211, in render
(Object: question)
KeyError: (see above)
The "title" field in your catalog's "Meta Data Table" is resolved into a DTML Method (named "title") for at least one of the objects to be catalogued. This DTML Method references a variable "question" which is not defined in the current context.
Dieter
Hi Dieter, Sorry, but You were right. About the key Eror. I have a DTML Method named type and a key named question. But I never thought I found it in the folder Products !!!! This product named QSurvey was deposed by me but not used till now. Hum, I will write a mail to the author.... For the second point, unfortunately I can't found what's wrong with me. Sincerily PS -------------------------------------------------- Oreka ! Nous sommes l'internet moins cher ! Surfez 25% moins cher avec http://www.oreka.com
participants (2)
-
Dieter Maurer -
Pascal Samuzeau