[EMAIL PROTECTED] wrote:
Hello,

I got a problem with latest_news et latest_document portlets:
It works well for an admin but I get a blinking !!! in state of the lasts
10 docs or news for anyone else.
It seems that this !!! come from

/CPSProducts/CPSSkins/PortalBoxGroup.py :
...
  if shield:
        try:
            rendered = portlet.render_cache(**kw)
        except ConflictError: # catch conflict errors
            raise
        except:
            LOG('CPSSkins.PortalBoxGroup:', DEBUG,
            """The portlet with id %s could not be rendered """
            """because it contains errors. To obtain a """
            """detailed error log please deactivate """
            """CPSSkins' built-in crash shield in """
            """portal_themes > Options > Deactivate """
            """the crash shield.""" % portlet.getId())
            rendered = '<blink>!!!PortalBoxGroup!!!</blink>'
  else:
            rendered = portlet.render_cache(**kw)
...
after crash shield dé-activation any user but admin can't connect any more
 and error logs shows :
  File "CPSProducts/CMFCore/FSPythonScript.py", line 164, in _exec
    result = f(*args, **kw)
  File "Script (Python)", line 208, in getContentItems
  File "Script (Python)", line 166, in getBrainInfo
Unauthorized: You are not allowed to access 'getContent' in this context

When those portlets are suppressed in this theme, everything works well
again

How to fix this problem ?

Context: debian3.1, zope 2.9.2,python2.4.3, cps3.4.1

Thanks



the crash shield makes it possible to access the site even if a portlet raises an exception for some reason (which might be for a reason not related to the portlet itself since exceptions can originate from anywhere in the code); which is why the site is available only when the crash shield is turned on.

you turn off the crash shield for debugging purposes to identify the line that fails

now that you've identified the line that causes the problem:

line 208, in getContentItems
line 166, in getBrainInfo

you might want to check that the Zcatalog does not contain references to objects that only the administrator can get access to.

or re-index the catalog, etc.

/JM




_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel

Reply via email to