[HELP] AttributeError [RESOLVED]

Hello Guys,

I'm having a little issue on a client which I don't know how to solve it.

When I access a list page i get some kind of error which i don't understand

As I can get from it is that 'simpleCatalogSearch' is missing, but I can check it is there:

Can someone point me to some kind of a way on how to understand what's wrong?

Could you post the text of the error message, rather than a screen shot?

You script "simpleCatalogSearch" sits in the "custom" skins folder and should be available in every context less the "custom" skin folder is not configured to be part of your custom skin/theme...check this in portal_skins -> layers (i think).

-aj

Hi,

Thanks for the reply.

Sorry for put it on image format.

Here you have

Traceback (innermost last):
  Module ZPublisher.Publish, line 126, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 46, in call_object
  Module Shared.DC.Scripts.Bindings, line 322, in __call__
  Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
  Module Products.PageTemplates.ZopePageTemplate, line 334, in _exec
  Module Products.PageTemplates.ZopePageTemplate, line 431, in pt_render
  Module Products.PageTemplates.PageTemplate, line 79, in pt_render
  Module zope.pagetemplate.pagetemplate, line 113, in pt_render
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 888, in do_useMacro
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 852, in do_condition
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 954, in do_defineSlot
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 946, in do_defineSlot
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 583, in do_setLocal_tal
  Module zope.tales.tales, line 696, in evaluate
   - URL: /Site_sotinco/fichas-retalho/fichas/index_html
   - Line 14, Column 0
   - Expression: <PythonExpr here.simpleCatalogSearch(caminho, 'Ficha', 'ascending', '')>
   - Names:
      {'container': <ATFolder at /Site_sotinco/fichas-retalho/fichas>,
       'context': <ATFolder at /Site_sotinco/fichas-retalho/fichas>,
       'default': <object object at 0x7fb88a035b20>,
       'here': <ATFolder at /Site_sotinco/fichas-retalho/fichas>,
       'loop': {},
       'nothing': None,
       'options': {'args': ()},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x7fb851456d08>,
       'request': <HTTPRequest, URL=http://www.sotinco.pt/fichas-retalho/fichas/index_html>,
       'root': <Application at >,
       'template': <ZopePageTemplate at /Site_sotinco/fichas-retalho/fichas/index_html>,
       'traverse_subpath': [],
       'user': <PloneUser 'paloalto'>}
  Module Products.PageTemplates.ZRPythonExpr, line 48, in __call__
   - __traceback_info__: here.simpleCatalogSearch(caminho, 'Ficha', 'ascending', '')
  Module PythonExpr, line 1, in <expression>
AttributeError: simpleCatalogSearch

Hi,

This is everything I have inside portal_skins

Click the Properties tab for portal_skins. Check which skin you're using, and then verify that for that skin the custom folder is included in the list of folders it will include.

Hi there,

I've done that and it seems that the folder is included.

Check the printscreen:

All of them have the python scripts folder which is inside the custom folder.

@tkimnguyen and @zopyx thanks for your help.

Case closed.

As @zopyx was right all the time. It was missing... And the procedure from @tkimnguyen works good.

I was looking all time for a old website directory which has the spoken implementation. When I set the described procedure it has worked at new website.

1 Like