
bharder at methodlogic
Apr 15, 2008, 2:02 PM
Post #2 of 13
(522 views)
Permalink
|
On Tue, Apr 15, 2008 at 03:13:37PM -0400, Waldo Jaquith wrote: > Folks, > > I'm warming up for The Big Transition to Bricolage(tm), going through Welcome :) > the paces with a few dozen articles to prepare for importing ~10,000 > of them. It didn't take me long to hit a snag: I can't create any new > records via the SOAP interface. > > After trying repeatedly with my own externally-created XML data, I ran > a simple test. I created a new story in Bricolage. I exported it. I > deleted it from Bricolage. Then I attempted to import it again with > bric_soap. It failed with "Unable to execute SQL statement." In my > logs, I found: > > ----------cut---------- > Use of uninitialized value in exists at /usr/local/bricolage/lib/Bric/ > SOAP/Story.pm line > 775, <GEN375> line 19. > [Tue Apr 15 18:42:44 2008] [error] SOAP::Serializer::envelope: Server > Application error > Unable to execute SQL statement: DBD::Pg::st execute failed: ERROR: > new row for relatio > n "story" violates check constraint "ck_story__publish_status"\n [.for > Statement "INSERT > INTO story (id, uuid, priority, source__id, usr__id, element_type__id, > first_publish_dat > e, publish_date, expire_date, current_version, published_version, > workflow__id, publish_ > status, primary_uri, active, desk__id, site__id, alias_id) VALUES > (NEXTVAL('seq_story'), > ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" with > ParamValues: 11='0', 7='2008-0 > 4-15 00:00:00.000000', 17=undef, 2='3', 1='BC91CEA6-0B1B-11DD- > B034-02A59314BD3F', 16='10 > 0', 13='/articles/2008/spring/test/', 6='2008-02-15 16:03:00.000000', > 3='1', 9=' > 0', 12='0', 14='0', 15='0', 8=undef, 4='0', 10=undef, 5='1'] at /usr/ > local/bricolage/lib > /Bric/Util/DBI.pm line 1083, <GEN375> line 19.\n\n[/usr/local/ > bricolage/lib/Bric/Util/DB > I.pm:1084]\n[/usr/local/bricolage/lib/Bric/Biz/Asset/Business/Story.pm: > 2332]\n[/usr/loca > l/bricolage/lib/Bric/Biz/Asset/Business/Story.pm:1904]\n[/usr/local/ > bricolage/lib/Bric/S > OAP/Story.pm:1021]\n[/usr/local/bricolage/lib/Bric/SOAP/Asset.pm: > 243]\n[/usr/lib/perl5/s > ite_perl/5.8.5/SOAP/Lite.pm:2569]\n[/usr/lib/perl5/site_perl/5.8.5/ > SOAP/Transport/HTTP.p > m:327]\n[/usr/lib/perl5/site_perl/5.8.5/SOAP/Transport/HTTP.pm:621]\n[/ > usr/local/bricola > ge/lib/Bric/SOAP/Handler.pm:169] > [/usr/local/bricolage/lib/Bric/SOAP/Handler.pm:249] > [/usr/lib/perl5/site_perl/5.8.5/SOAP/Lite.pm:2649] > [/usr/lib/perl5/site_perl/5.8.5/SOAP/Lite.pm:1505] > [/usr/lib/perl5/site_perl/5.8.5/SOAP/Lite.pm:761] > [/usr/lib/perl5/site_perl/5.8.5/SOAP/Lite.pm:2624] > [/usr/lib/perl5/site_perl/5.8.5/SOAP/Transport/HTTP.pm:338] > [/usr/lib/perl5/site_perl/5.8.5/SOAP/Lite.pm:2617] > [/usr/lib/perl5/site_perl/5.8.5/SOAP/Transport/HTTP.pm:327] > [/usr/lib/perl5/site_perl/5.8.5/SOAP/Transport/HTTP.pm:621] > [/usr/local/bricolage/lib/Bric/SOAP/Handler.pm:169] > ----------cut---------- > > To my eyes, the crux of this appears to be "new row for relation > 'story' violates check constraint 'ck_story__publish_status'". Being a > MySQL guy, not a Postgres guy, I'm really not sure of what to do with > this. I'm running Bricolage 1.10.3 and PostgreSQL 7.4.17-1. I've > checked the bug tracker and the 1.10.4 changelog, and can find no > record of this. I think your eyes are right, regarding the crux of the problem... Your publish_status is 0, yet there are two publish-dates provided (publish_date, first_publish_date)... the constraint is that: If there's a "true" status for publish_status, we need dates. If there's a "false" status for publish_status, dates must be NULL. Not sure how this record came to be attempted in your DB, but that's what appears to be happening. Hope this helps, > Any suggestions? Am I -- as I hope -- doing something foolish? -- Brad Harder, Method Digital Logic http://www.methodlogic.net
|