Mailing List Archive

ERROR: invalid input syntax for integer: "" when uploading media - media type selection box missing
Dear all,

Trying add a piece of media. When I click on New Media, the resulting form has no drop-down for the
Media Type attribute (see screenshot attached). This attribute is marked as compulsory. If I try to
submit the form anyway, I get the error below.

This selection box is missing whether there are 0, 1 or more active Media Types listed under Publishing.

Can anyone help, please?

Ian


Unable to execute SQL statement

DBD::Pg::st execute failed: ERROR: invalid input syntax for integer: "" [for Statement "
SELECT a.id, a.name, a.key_name, a.description, a.top_level, a.paginated, a.fixed_uri,
a.related_story, a.related_media, a.media, a.displayed, a.biz_class__id, a.type__id, a.active, m.grp__id
FROM element_type a, member m, element_type_member etm
WHERE a.id = etm.object_id AND etm.member__id = m.id AND m.active = '1' AND a.id = ?
ORDER BY a.name, a.id
" with ParamValues: 1=''] at /usr/local/bricolage/lib/Bric/Util/DBI.pm line 1138, <GEN3> line 74.

Error Details (hide)

Fault Class
Bric::Util::Fault::Exception::DA
Description
Data Access Exception
Timestamp
2011-05-27 11:00:57.000000
Package
Bric::Util::DBI
Filename
/usr/local/bricolage/lib/Bric/Util/DBI.pm
Line
1139

Stack:

Trace begun at /usr/local/bricolage/lib/Bric/Util/DBI.pm line 1139
Bric::Util::DBI::execute('DBI::st=HASH(0xbc372b70)', '') called at
/usr/local/bricolage/lib/Bric/Biz/ElementType.pm line 2264
Bric::Biz::ElementType::_do_list('Bric::Biz::ElementType', 'HASH(0xba5af170)') called at
/usr/local/bricolage/lib/Bric/Biz/ElementType.pm line 418
Bric::Biz::ElementType::lookup('Bric::Biz::ElementType', 'HASH(0xba5af170)') called at
/usr/local/bricolage/lib/Bric/App/Callback/Profile/Media.pm line 523
Bric::App::Callback::Profile::Media::create('Bric::App::Callback::Profile::Media=HASH(0xbc1bedc8)')
called at /usr/share/perl5/Params/CallbackRequest.pm line 296
eval {...} at /usr/share/perl5/Params/CallbackRequest.pm line 286
Params::CallbackRequest::request('Params::CallbackRequest=HASH(0xb9c5cc08)', 'HASH(0xba062ba0)',
'requester', 'MasonX::Interp::WithCallbacks=HASH(0xba5a99b0)', 'apache_req',
'Apache2::Request=SCALAR(0xba8a2990)') called at /usr/share/perl5/MasonX/Interp/WithCallbacks.pm
line 119
MasonX::Interp::WithCallbacks::make_request('MasonX::Interp::WithCallbacks=HASH(0xba5a99b0)',
'comp', '/workflow/profile/media/new/1058', 'args', 'ARRAY(0xbc1bf158)', 'ah',
'HTML::Mason::ApacheHandler=HASH(0xba5a41f0)', 'apache_req', 'Apache2::Request=SCALAR(0xba8a2990)')
called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 874
eval {...} at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 873
HTML::Mason::ApacheHandler::prepare_request('HTML::Mason::ApacheHandler=HASH(0xba5a41f0)',
'Apache2::RequestRec=SCALAR(0xbc3ba4f0)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm
line 828
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0xba5a41f0)',
'Apache2::RequestRec=SCALAR(0xbc3ba4f0)') called at /usr/local/bricolage/lib/Bric/App/Handler.pm
line 308
eval {...} at /usr/local/bricolage/lib/Bric/App/Handler.pm line 297
Bric::App::Handler::handler('Apache2::RequestRec=SCALAR(0xbc3ba4f0)') called at -e line 0
eval {...} at -e line 0
Re: ERROR: invalid input syntax for integer: "" when uploading media - media type selection box missing [ In reply to ]
Hi Ian,

Have you defined a element type for your media (or deleted the standard
Photograph and Illustration element types that are installed with
Bricolage - see note below)?

The Media Types under the Publishing menu are not related to the Media
Type dropdown on the New Media page in the way that you might expect
when looking at the GUI.

Here's what you need to do to add an image:

Publishing > Element Types > Add a New Element Type

Set Key Name and Name as appropriate (e.g., photograph and Photograph)
Set Content Type to Image
Click Next and save the new element type

* Note: The photograph and illustration element types are part of the
standard installation of Bricolage 2.0.1 - if you have deleted them,
you'll need to either bring them back to life via the database, or use
different key names:

UPDATE element_type SET active = true WHERE key_name = 'photograph';
UPDATE element_type SET active = true WHERE key_name = 'illustration';

It is these element types that populate the Media Type drop down list on
the New Media page.

I've started writing a Wiki page on how to use images in Bricolage
documents, but it's still under construction. It may still be of use
though:

https://github.com/bricoleurs/bricolage/wiki/HOWTO:-Insert-Images



Regards,

Mike



On 27/05/11 11:06, Ian Gibbs wrote:
> Dear all,
>
> Trying add a piece of media. When I click on New Media, the resulting
> form has no drop-down for the Media Type attribute (see screenshot
> attached). This attribute is marked as compulsory. If I try to submit
> the form anyway, I get the error below.
>
> This selection box is missing whether there are 0, 1 or more active
> Media Types listed under Publishing.
>
> Can anyone help, please?
>
> Ian
Re: ERROR: invalid input syntax for integer: "" when uploading media - media type selection box missing [ In reply to ]
On 05/27/2011 11:46 AM, Mike Raynham wrote:
> Hi Ian,
>
> Have you defined a element type for your media (or deleted the standard Photograph and Illustration
> element types that are installed with Bricolage - see note below)?
>
> The Media Types under the Publishing menu are not related to the Media Type dropdown on the New
> Media page in the way that you might expect when looking at the GUI.
>
> Here's what you need to do to add an image:
>
> Publishing > Element Types > Add a New Element Type
>
> Set Key Name and Name as appropriate (e.g., photograph and Photograph)
> Set Content Type to Image
> Click Next and save the new element type
>
> * Note: The photograph and illustration element types are part of the standard installation of
> Bricolage 2.0.1 - if you have deleted them, you'll need to either bring them back to life via the
> database, or use different key names:
>
> UPDATE element_type SET active = true WHERE key_name = 'photograph';
> UPDATE element_type SET active = true WHERE key_name = 'illustration';
>
> It is these element types that populate the Media Type drop down list on the New Media page.
>
> I've started writing a Wiki page on how to use images in Bricolage documents, but it's still under
> construction. It may still be of use though:
>
> https://github.com/bricoleurs/bricolage/wiki/HOWTO:-Insert-Images
>
>
>
> Regards,
>
> Mike
>
>
>
> On 27/05/11 11:06, Ian Gibbs wrote:
>> Dear all,
>>
>> Trying add a piece of media. When I click on New Media, the resulting
>> form has no drop-down for the Media Type attribute (see screenshot
>> attached). This attribute is marked as compulsory. If I try to submit
>> the form anyway, I get the error below.
>>
>> This selection box is missing whether there are 0, 1 or more active
>> Media Types listed under Publishing.
>>
>> Can anyone help, please?
>>
>> Ian


Thanks Mike. With some information from that page and your email, and a bit of experimentation, I
have managed to get it working.

Ian
Re: ERROR: invalid input syntax for integer: "" when uploading media - media type selection box missing [ In reply to ]
On 09/06/11 14:46, Ian Gibbs wrote:
> On 05/27/2011 11:46 AM, Mike Raynham wrote:
>
>
> Thanks Mike. With some information from that page and your email, and a
> bit of experimentation, I have managed to get it working.
>
> Ian

I'm glad to hear it. It confused me too at first, but it makes sense
once you understand why it works the way it does. I keep meaning to
complete that wiki page, but keep getting sidetracked.


Regards,

Mike