Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: bugs

[Bug 1245] bric_soap rollback failure

 

 

Bricolage bugs RSS feed   Index | Next | Previous | View Threaded


bugzilla-daemon at bugs

Apr 14, 2008, 1:11 PM

Post #1 of 3 (179 views)
Permalink
[Bug 1245] bric_soap rollback failure

http://bugs.bricolage.cc/show_bug.cgi?id=1245


David Wheeler <david[at]kineticode.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |david[at]kineticode.com
AssignedTo|lannings[at]who.int |david[at]kineticode.com




--
Configure bugmail: http://bugs.bricolage.cc/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


bugzilla-daemon at bugs

Apr 14, 2008, 1:12 PM

Post #2 of 3 (162 views)
Permalink
[Bug 1245] bric_soap rollback failure [In reply to]

http://bugs.bricolage.cc/show_bug.cgi?id=1245


David Wheeler <david[at]kineticode.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED




--
Configure bugmail: http://bugs.bricolage.cc/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


bugzilla-daemon at bugs

Apr 25, 2008, 10:24 AM

Post #3 of 3 (153 views)
Permalink
[Bug 1245] bric_soap rollback failure [In reply to]

http://bugs.bricolage.cc/show_bug.cgi?id=1245


David Wheeler <david[at]kineticode.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |WORKSFORME




--- Comment #9 from David Wheeler <david[at]kineticode.com> 2008-04-25 13:24:18 ---
I still can't replicate this. Here's what I did to try:

* Created a story with a contributor
* Exported it via SOAP.
* Edited the resulting XML file with two new stories, based on the original.
+ Both have new slugs and URLs.
+ The first one is completely valid.
+ I misspelled the contributor name in the second one.
* I tried to do `story create` to create the two stories. It failed.
* There were *no* new stories in the system.
* I corrected the spelling of the contributor in the story.
* I ran `bric_soap story create` on the file again. Two new stories were
created.

Scott, this problem is likely not related to the calls to `begin()`,
`commit()`, and `rollback()` in Bric::SOAP::Story. Why not? Because no value is
passed to them. If one of these functions is called under mod_perl and a true
value is not passed as the first argument then nothing will happen when those
functions are called.

That is, Bric::SOAP::Story calls:

# Start a transaction.
begin();

But if you look at `Bric::Util::DBI::begin()`, you see:

sub begin {
return 1 unless TRANSACTIONAL;
return 1 if MOD_PERL && !$_[0];

It's that second line that prevents the call to begin() from doing anything
(why we call it in Bric::SOAP::Story, in that case, I have no idea).

Note that Bric::SOAP::Handler does call it with an argument:

# Start the database transactions.
begin(1);

That's why transactions work as they should in the SOAP interface.

So since I can't replicate it, I'm going to close this bug. Neal, if you run
into it again, can you send me the XML that caused the trouble so I can take a
look at what all it's doing?

Thanks!


--
Configure bugmail: http://bugs.bricolage.cc/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

Bricolage bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.