Investigating further the page is actually being posted twice. This was due to javascript and not the database, transactions, or otherwise. <br><br>
<div class="gmail_quote">On Tue, Dec 15, 2009 at 11:50 AM, Andreas Jung <span dir="ltr">&lt;<a href="mailto:lists@zopyx.com">lists@zopyx.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">-----BEGIN PGP SIGNED MESSAGE-----<br>Hash: SHA1<br><br>Please re-read my answer.<br><br>Andreas<br><br>schrieb Justin Dunsworth:<br>


<div>
<div></div>
<div class="h5">&gt; This seems to be happening on more than just one query now... is<br>&gt; there any suggestion on where to look?<br>&gt;<br>&gt; On Thu, Dec 10, 2009 at 1:14 PM, Justin Dunsworth &lt;<br>&gt; <a href="mailto:justin.dunsworth@gmail.com">justin.dunsworth@gmail.com</a>&gt; wrote:<br>

&gt;<br>&gt;&gt; Thanks for the reply... Are you suggesting that there may be an<br>&gt;&gt; issue with MySQL receiving the data from zope and the way it<br>&gt;&gt; handles it?<br>&gt;&gt;<br>&gt;&gt; Strange thing is that I&#39;m using the exact same method I have used<br>

&gt;&gt; thousands of times over and same code layout and this is the<br>&gt;&gt; first time I&#39;m seeing it. I&#39;ve changed around a few things<br>&gt;&gt; relating to variable names etc thinking it was the case but<br>

&gt;&gt; dumbing it down to the simplest way I can still is giving the<br>&gt;&gt; error.<br>&gt;&gt;<br>&gt;&gt; On Thu, Dec 10, 2009 at 1:03 PM, Andreas Jung &lt;<a href="mailto:lists@zopyx.com">lists@zopyx.com</a>&gt;<br>

&gt;&gt; wrote:<br>&gt;&gt;<br>&gt;&gt;&gt; In case of a ZODB conflict error the whole request will be<br>&gt;&gt;&gt; repeat up to three times. If you database does not provide<br>&gt;&gt;&gt; proper transaction support (trible check your MySQL<br>

&gt;&gt;&gt; installation and your table type useage), you&#39;re doomed. A<br>&gt;&gt;&gt; proper RDBMS like Oracle or Postgres will behave properly and<br>&gt;&gt;&gt; abort the transaction in case of a ZODB transaction abort.<br>

&gt;&gt;&gt;<br>&gt;&gt;&gt; -aj<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Am 10.12.09 19:59, schrieb Justin Dunsworth:<br>&gt;&gt;&gt;&gt; I am running into a brand new issue today that I can&#39;t, for<br>&gt;&gt;&gt;&gt; the life of me, figure out. I wrote a standard page to insert<br>

&gt;&gt;&gt;&gt; data into a MySQL table using Z SQL methods from a form like<br>&gt;&gt;&gt;&gt; I always have but for some strange reason it&#39;s running the<br>&gt;&gt;&gt;&gt; same query twice, thus adding a duplicate entry.<br>

&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; I have confined the original code in it&#39;s own document,<br>&gt;&gt;&gt;&gt; checked, double checked, and still no avail. Here&#39;s the code<br>&gt;&gt;&gt;&gt; for the page:<br>&gt;&gt;&gt;&gt;<br>

&gt;&gt;&gt;&gt; &lt;dtml-var frame_header&gt; &lt;dtml-if addnewstatus&gt; &lt;dtml-try&gt;<br>&gt;&gt;&gt;&gt; &lt;dtml-call &quot;RootSQLMethods.admin.Status_Add(_.None,_)&quot;&gt;<br>&gt;&gt;&gt;&gt; &lt;dtml-call &quot;RESPONSE.redirect(BASE2+&#39;/statuses&#39;)&quot;&gt;<br>

&gt;&gt;&gt;&gt; &lt;dtml-except&gt; &lt;p&gt;Error while submitting! Status not<br>&gt;&gt;&gt;&gt; added.&lt;/p&gt; &lt;br&gt;Error type: &lt;dtml-var error_type&gt; &lt;br&gt;Error<br>&gt;&gt;&gt;&gt; value: &lt;dtml-var error_value&gt; &lt;/dtml-try&gt; &lt;/dtml-if&gt; &lt;form<br>

&gt;&gt;&gt;&gt; action=&quot;&amp;dtml-URL;&quot; method=&quot;post&quot;&gt; &lt;table class=&quot;tborder&quot;<br>&gt;&gt;&gt;&gt; align=&quot;center&quot; width=&quot;30%&quot; cellspacing=&quot;0&quot; &gt; &lt;tr&gt;&lt;td<br>

&gt;&gt;&gt;&gt; class=&quot;tcat&quot; align=&quot;center&quot; colspan=&quot;2&quot; style=&quot;font-size:<br>&gt;&gt;&gt;&gt; 12pt;&quot;&gt;Add New Status&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td width=&quot;35%&quot;<br>

&gt;&gt;&gt;&gt; align=&quot;right&quot;&gt;&lt;b&gt;Name:&lt;/b&gt;&lt;/td&gt;&lt;td width=&quot;65%&quot;&gt;&lt;input<br>&gt;&gt;&gt;&gt; type=&quot;text&quot; name=&quot;name_add&quot; size=15&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td<br>

&gt;&gt;&gt;&gt; width=&quot;35%&quot; align=&quot;right&quot;<br>&gt;&gt;&gt;&gt; valign=&quot;top&quot;&gt;&lt;b&gt;Description:&lt;/b&gt;&lt;/td&gt;&lt;td<br>&gt;&gt;&gt;&gt; width=&quot;65%&quot;&gt;&lt;textarea name=&quot;description_add&quot; cols=25<br>

&gt;&gt;&gt;&gt; rows=4&gt;&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td width=&quot;35%&quot;<br>&gt;&gt;&gt;&gt; align=&quot;right&quot;&gt;&lt;b&gt;Sort:&lt;/b&gt;&lt;/td&gt;&lt;td width=&quot;65%&quot;&gt;&lt;input<br>

&gt;&gt;&gt;&gt; type=&quot;text&quot; name=&quot;sort_add&quot; value=&quot;5&quot;<br>&gt;&gt;&gt; size=1&gt;&lt;/td&gt;&lt;/tr&gt;<br>&gt;&gt;&gt;&gt; &lt;tr&gt;&lt;td align=&quot;center&quot; colspan=&quot;2&quot;&gt;&lt;hr&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;<br>

&gt;&gt;&gt;&gt; &lt;td&gt;&lt;input type=&quot;hidden&quot; name=&quot;addnewstatus&quot; value=&quot;1&quot;&gt;&lt;/td&gt;<br>&gt;&gt;&gt;&gt; &lt;td&gt; &lt;button class=&quot;button&quot; onclick=&quot;this.form.submit()&quot;&gt;Add<br>

&gt;&gt;&gt;&gt; Status&lt;/button&gt;&amp;nbsp;&amp;nbsp; &lt;button class=&quot;button&quot;<br>&gt;&gt;&gt;&gt; onclick=&quot;window.location = &#39;&lt;dtml-var BASE2&gt;/statuses&#39;;<br>&gt;&gt;&gt;&gt; return false;&quot;&gt;Cancel&lt;/button&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt;<br>

&gt;&gt;&gt;&gt; &lt;dtml-var frame_footer&gt;<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; I can run the SQL Method by itself and it works just fine<br>&gt;&gt;&gt;&gt; (only inserting it once) but when run as a separate page it<br>

&gt;&gt;&gt;&gt; adds the two.<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; Any assistance is appreciated<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; _______________________________________________ Zope maillist<br>

&gt;&gt;&gt;&gt; -  <a href="mailto:Zope@zope.org">Zope@zope.org</a> <a href="https://mail.zope.org/mailman/listinfo/zope" target="_blank">https://mail.zope.org/mailman/listinfo/zope</a><br>&gt;&gt;&gt;&gt; **   No cross posts or HTML encoding!  ** (Related lists -<br>

&gt;&gt;&gt;&gt; <a href="https://mail.zope.org/mailman/listinfo/zope-announce" target="_blank">https://mail.zope.org/mailman/listinfo/zope-announce</a><br>&gt;&gt;&gt;&gt; <a href="https://mail.zope.org/mailman/listinfo/zope-dev" target="_blank">https://mail.zope.org/mailman/listinfo/zope-dev</a> )<br>

&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; -- ZOPYX Ltd. &amp; Co KG          \  zopyx group Charlottenstr.<br>&gt;&gt;&gt; 37/1          \  The full-service network for your D-72070<br>&gt;&gt;&gt; Tübingen              \  Python, Zope and Plone projects<br>

&gt;&gt;&gt; <a href="http://www.zopyx.com/" target="_blank">www.zopyx.com</a>, <a href="mailto:info@zopyx.com">info@zopyx.com</a>  \  <a href="http://www.zopyxgroup.com/" target="_blank">www.zopyxgroup.com</a><br>&gt;&gt;&gt; ------------------------------------------------------------------------<br>

&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>E-Publishing, Python, Zope &amp; Plone development, Consulting<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;<br>&gt;<br></div></div>&gt; ----------------------------------------------------------------------<br>


<div class="im">&gt;<br>&gt;<br>&gt;<br>_______________________________________________<br>&gt; Zope maillist  -  <a href="mailto:Zope@zope.org">Zope@zope.org</a><br>&gt; <a href="https://mail.zope.org/mailman/listinfo/zope" target="_blank">https://mail.zope.org/mailman/listinfo/zope</a> **   No cross posts or<br>

&gt; HTML encoding!  ** (Related lists -<br>&gt; <a href="https://mail.zope.org/mailman/listinfo/zope-announce" target="_blank">https://mail.zope.org/mailman/listinfo/zope-announce</a><br>&gt; <a href="https://mail.zope.org/mailman/listinfo/zope-dev" target="_blank">https://mail.zope.org/mailman/listinfo/zope-dev</a> )<br>

<br><br>- --<br>ZOPYX Ltd. &amp; Co KG \ zopyx group<br>Charlottenstr. 37/1 \ The full-service network for your<br>D-72070 Tübingen \ Python, Zope and Plone projects<br><a href="http://www.zopyx.com/" target="_blank">www.zopyx.com</a>, <a href="mailto:info@zopyx.com">info@zopyx.com</a> \ <a href="http://www.zopyxgroup.com/" target="_blank">www.zopyxgroup.com</a><br>

- ------------------------------------------------------------------------<br>E-Publishing, Python, Zope &amp; Plone development, Consulting<br><br></div>-----BEGIN PGP SIGNATURE-----<br>Version: GnuPG v1.4.10 (Darwin)<br>

Comment: Using GnuPG with Mozilla - <a href="http://enigmail.mozdev.org/" target="_blank">http://enigmail.mozdev.org/</a><br><br>iEYEARECAAYFAksnzGMACgkQCJIWIbr9KYwPlACg1ddItBhsM1dT10Iq9pE/ULgE<br>RwkAoOfg9NdwZKdvx9DqSWfK91X1myTh<br>

=x0AL<br>-----END PGP SIGNATURE-----<br><br></blockquote></div><br>