[Zope] Find and Catalog

Pascal Samuzeau samuzeau@oreka.com
Fri, 28 Jun 2002 09:08:51 +0100


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