I am trying this soap command to clone a bunch of stories to a new category, but it says there is a SQL error. Can anyone tell me what I am doing wrong, or if there is a better way to do this?
bricolage/bin/bric_soap story list_ids --search uri="/louisville/%" | bricolage/bin/bric_soap story export - | sed -e 's/\/louisville\//\/cincinnati\//' | bricolage/bin/bric_soap story create -
Output:
Call to Bric::SOAP::Story->create failed:
Unable to execute SQL statement
Check the Apache error log for more detail.
Output of the Apache error log:
[Wed Sep 16 23:06:16 2009] [error] SOAP::Serializer::envelope: Server Application error Unable to execute SQL statement: DBD::Pg::st execute failed: ERROR: new row for relation "story" violates check constraint "ck_story__publish_status" [.for Statement "INSERT INTO story (id, uuid, priority, source__id, usr__id, element_type__id, first_publish_date, 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: 1='8e95d088-cb1a-4312-b902-dee2917e4fbb', 2='3', 3='1025', 4='1027', 5='1061', 6='2009-06-05 22:11:31.000000', 7='2009-09-14 15:44:23.000000', 8=undef, 9='0', 10=undef, 11='0', 12='0', 13='/cincinnati/index.php', 14='0', 15='0', 16='1224', 17=undef] at /usr/local/bricolage/lib/Bric/Util/DBI.pm line 1136, <GEN250> line 28.\n\n[/usr/local/bricolage/lib/Bric/Util/DBI.pm:1137]\n[/usr/local/bricolage/lib/Bric/Biz/Asset/Business/Story.pm:2328]\n[/usr/local/bricolage/lib/Bric/Biz/Asset/Business/Story.pm:1900]\n[/usr/local/bricolage/lib/Bric/SOAP/Story.pm:1032]\n[/usr/local/bricolage/lib/Bric/SOAP/Asset.pm:246]\n[/usr/share/perl5/SOAP/Lite.pm:2744]\n[/usr/share/perl5/SOAP/Transport/HTTP.pm:394]\n[/usr/share/perl5/SOAP/Transport/HTTP.pm:717]\n[/usr/local/bricolage/lib/Bric/SOAP/Handler.pm:175]\n[-e:0]
[/usr/local/bricolage/lib/Bric/SOAP/Handler.pm:256]
[/usr/share/perl5/SOAP/Lite.pm:2838]
[/usr/share/perl5/SOAP/Lite.pm:1550]
[/usr/share/perl5/SOAP/Lite.pm:746]
[/usr/share/perl5/SOAP/Lite.pm:2802]
[/usr/share/perl5/SOAP/Transport/HTTP.pm:406]
[/usr/share/perl5/SOAP/Lite.pm:2795]
[/usr/share/perl5/SOAP/Transport/HTTP.pm:394]
[/usr/share/perl5/SOAP/Transport/HTTP.pm:717]
[/usr/local/bricolage/lib/Bric/SOAP/Handler.pm:175]
[-e:0]
bricolage/bin/bric_soap story list_ids --search uri="/louisville/%" | bricolage/bin/bric_soap story export - | sed -e 's/\/louisville\//\/cincinnati\//' | bricolage/bin/bric_soap story create -
Output:
Call to Bric::SOAP::Story->create failed:
Unable to execute SQL statement
Check the Apache error log for more detail.
Output of the Apache error log:
[Wed Sep 16 23:06:16 2009] [error] SOAP::Serializer::envelope: Server Application error Unable to execute SQL statement: DBD::Pg::st execute failed: ERROR: new row for relation "story" violates check constraint "ck_story__publish_status" [.for Statement "INSERT INTO story (id, uuid, priority, source__id, usr__id, element_type__id, first_publish_date, 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: 1='8e95d088-cb1a-4312-b902-dee2917e4fbb', 2='3', 3='1025', 4='1027', 5='1061', 6='2009-06-05 22:11:31.000000', 7='2009-09-14 15:44:23.000000', 8=undef, 9='0', 10=undef, 11='0', 12='0', 13='/cincinnati/index.php', 14='0', 15='0', 16='1224', 17=undef] at /usr/local/bricolage/lib/Bric/Util/DBI.pm line 1136, <GEN250> line 28.\n\n[/usr/local/bricolage/lib/Bric/Util/DBI.pm:1137]\n[/usr/local/bricolage/lib/Bric/Biz/Asset/Business/Story.pm:2328]\n[/usr/local/bricolage/lib/Bric/Biz/Asset/Business/Story.pm:1900]\n[/usr/local/bricolage/lib/Bric/SOAP/Story.pm:1032]\n[/usr/local/bricolage/lib/Bric/SOAP/Asset.pm:246]\n[/usr/share/perl5/SOAP/Lite.pm:2744]\n[/usr/share/perl5/SOAP/Transport/HTTP.pm:394]\n[/usr/share/perl5/SOAP/Transport/HTTP.pm:717]\n[/usr/local/bricolage/lib/Bric/SOAP/Handler.pm:175]\n[-e:0]
[/usr/local/bricolage/lib/Bric/SOAP/Handler.pm:256]
[/usr/share/perl5/SOAP/Lite.pm:2838]
[/usr/share/perl5/SOAP/Lite.pm:1550]
[/usr/share/perl5/SOAP/Lite.pm:746]
[/usr/share/perl5/SOAP/Lite.pm:2802]
[/usr/share/perl5/SOAP/Transport/HTTP.pm:406]
[/usr/share/perl5/SOAP/Lite.pm:2795]
[/usr/share/perl5/SOAP/Transport/HTTP.pm:394]
[/usr/share/perl5/SOAP/Transport/HTTP.pm:717]
[/usr/local/bricolage/lib/Bric/SOAP/Handler.pm:175]
[-e:0]