Ticket #8090 (closed Bug: wontfix)

Opened 8 years ago

Last modified 4 years ago

Redirect-Exception throws error in portlet safe_renderer

Reported by: saily Owned by:
Priority: trivial Milestone: 3.3.x
Component: General Version:
Keywords: Cc:


i'm using redirect-exceptions in my zope formlib actions. if i use formlib in portlets the redirect exception is not caught and the portlet throws an error.

from zExceptions import Redirect

def action_save(self, action, data):
    raise Redirect("@@some_view")

this works correctly in forms, but not in form-portlets.

Change History

comment:1 Changed 8 years ago by saily

i tried this, works.

    from zExceptions import Redirect
    def safe_render(self, portlet_renderer):
            return portlet_renderer.render()
        except Redirect, ConflictError:
        except Exception:
            logger.exception('Error while rendering %r' % (self,))
            aq_acquire(self, 'error_log').raising(sys.exc_info())
            return self.error_message()

so if somebody needs this too, we should probably fix it in plone.app.portlets/plone/app/portlets/manager.py or use self.request.RESPONSE.redirect('@@some_url') instead.

comment:2 Changed 8 years ago by hannosch

  • Owner changed from somebody to optilude
  • Component changed from Unknown to Portlets

comment:3 Changed 7 years ago by hannosch

  • Owner optilude deleted
  • Component changed from Portlets to Infrastructure

comment:4 Changed 4 years ago by ida

  • Status changed from new to closed
  • Resolution set to wontfix

Are you still experiencing the issue in Plone-4.x ? Otherwise this ticket could be closed, as Plone-3.x is not supported anymore.

comment:5 Changed 4 years ago by davisagli

  • Component changed from Infrastructure to General
Note: See TracTickets for help on using tickets.