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

Mailing List Archive: Bricolage: devel

bric_dev_sync

 

 

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


jallad at optonline

Dec 31, 2008, 12:53 PM

Post #1 of 3 (1118 views)
Permalink
bric_dev_sync

Hello,

When running bric_dev_sync to move my elements and templates from a 1.10
install to 1.11, I got the following error :

SOAP::Serializer::envelope: Server Application error Unable to execute
SQL statement: DBD::Pg::st execute failed: ERROR: null value in column
"min_occurrence" violates not-null constraint\n [.for Statement "UPDATE
field_type SET element_type__id = ?, name = ?, key_name = ?, description
= ?, place = ?, min_occurrence = ?, max_occurrence = ?, autopopulated =
?, max_length = ?, sql_type = ?, widget_type = ?, "precision" = ?, cols
= ?, rows = ?, length = ?, vals = ?, multiple = ?, default_val = ?,
active = ? WHERE id=?" with ParamValues: 11='textarea', 7=undef, 17='1',
2='Copy', 1='6', 18=undef, 16='', 13='50', 6=undef, 3='copy', 9='1024',
12=undef, 20='5', 14='8', 15='0', 8='0', 4='The inset copy text.',
19='1', 10='blob', 5='1'] at /usr/local/bricolage/lib/Bric/Util/DBI.pm
line 1136


I'm not sure this is the right fix, but it looks like min/max occurrence
just need non-null defaults.

I added the following at line 1872 in
Bric/Biz/ElementType/Parts/FieldType.pm:

if (not defined $self->get_min_occurrence()){
$self->set_min_occurrence(0);
}
if (not defined $self->get_max_occurrence()){
$self->set_max_occurrence(0);
}

It seems to have fixed the bric_dev_sync issue, templates and elements
look OK. . . hopefully helpful for anyone else having this issue.

- Kahil


david at kineticode

Dec 31, 2008, 3:25 PM

Post #2 of 3 (1029 views)
Permalink
Re: bric_dev_sync [In reply to]

On Dec 31, 2008, at 9:53 PM, Kahil Jallad wrote:

> I'm not sure this is the right fix, but it looks like min/max
> occurrence just need non-null defaults.
>
> I added the following at line 1872 in Bric/Biz/ElementType/Parts/
> FieldType.pm:
>
> if (not defined $self->get_min_occurrence()){
> $self->set_min_occurrence(0);
> }
> if (not defined $self->get_max_occurrence()){
> $self->set_max_occurrence(0);
> }
>
> It seems to have fixed the bric_dev_sync issue, templates and
> elements look OK. . . hopefully helpful for anyone else having this
> issue.

Right fix, but wrong spot. The attached patch should also do the trick.

Thanks,

David


david at kineticode

Dec 31, 2008, 3:27 PM

Post #3 of 3 (1029 views)
Permalink
Re: bric_dev_sync [In reply to]

On Jan 1, 2009, at 12:25 AM, David E. Wheeler wrote:

> Right fix, but wrong spot. The attached patch should also do the
> trick.
>
> Thanks,
>
> David

And here it is again, this time with the full path to the file to be
patched, and named so that it won't be stripped out my the mail list
server. :-)

Best,

David
Attachments: min_max_soap_defaults.patch.txt (1.98 KB)

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


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.