Re: Problem creating a dexterity Link object

Luca Bellenghi <[email protected]>
Newsgroups gmane.comp.web.zope.plone.user
Message-ID <CAOc=T0S7KJp=gLPbd1qaceenS6DezkNfmXqyrD+ZGTvB=ssTUg@mail.gmail.com>
Ok, we have an automatic mail involved in this process. I'm able to fix
this problem simply swapping two lines of code.

I'm not able to understand why tests still break for the same reason

Anyway, thanks a lot

On Sat, Sep 13, 2014 at 9:30 AM, dieter <[email protected]> wrote:

> Luca Bellenghi <[email protected]> writes:
> > I'm trying to create a new dexterity Link object using plone.api methods.
> >
> > few days ago all works fine and I'm not able to understand what we have
> > changed, but right now i get this error:
> >
> > http://pastebin.com/MhU4Zrfb
>
> I would have prefered the traceback inside the message
> (this facilitates quoting).
>
> (Manually quoted:)
> > ...
> >Module Products.CMFEditions.CopyModifyMergeRepositoryTool, line 497, in
> _retrieve
> >    TypeError: ('Savepoints unsupported',
> <zope.sendmail.delivery.MailDataManager object at 0x7f3da19f6250>)
>
> > ...
> > someone has some hint to debug this problem ?
>
> What you see here is an "environmental" error: an error which
> occurs only in special environments under special conditions.
>
> Apparently, "CMFEditions" uses "savepoint"s. "savepoint"s can be used
> in two modes "normal" and "optimisitc". In "normal" mode (likely
> used by "CMFEditions"), all data managers currently registered with
> the current transaction must support savepoints. The problem you
> observe is due to the fact, that one of those data managers
> ("zope.sendmail.delivery.MailDataManager") does not support
> savepoints. That "MailDataManager" is registered indicates, that
> you have previously (in this transaction) tried to send an email.
> Thus, the error you observe only occurs when you use "CMFEditions"
> and you send emails.
>
> In optimitic mode, "transaction.savepoint" checks "savepoint" support
> of the registered data managers not immediately but only on "rollback".
> Likely, "CMFEditions" does not plan to "rollback" - and therefore
> should use optimitic mode (likely a bug, you may file a report for).
> In fact, in my option, "optimistic" should be the default
> for "transaction.savepoint" - but unfortunately, this is not the case.
>
>
> In the past, I have used monkey patching (via "dm.reuse.rebindFunction")
> to change the default mode of "transaction.savepoint" to
> optimitic in similar cases.
>
> Monkey patching, however, is somewhat
> dangerous (you may hit a situation where some component expects the
> unpatched behaviour).
>
>
>
> ------------------------------------------------------------------------------
> Want excitement?
> Manually upgrade your production database.
> When you want reliability, choose Perforce
> Perforce version control. Predictably reliable.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
> _______________________________________________
> Plone-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/plone-users
>

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk

_______________________________________________
Plone-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plone-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.