Mailing List Archive

how to make new autopopulated image field_types via db?
Hi all

I have a new image element type 'inline_image' and I want to add all the nice autopopulated fields Illustration and Photograph enjoy.

I tried copying the settings from the default Illustration element type (ID = 4) to a new entry in the field_type table associating my inline_image element_type__id. Sadly I got this error:

ERROR: duplicate key violates unique constraint "udx_field_type__key_name__et_id"

And yet the Photograph element_type also shares a 'width' key_name field element with Illustration.

I thought there was documentation on this but I can't find it.

any thoughts appreciated,

Dawn
Re: how to make new autopopulated image field_types via db? [ In reply to ]
On Jun 17, 2011, at 11:09 AM, Dawn Buie wrote:

> Hi all
>
> I have a new image element type 'inline_image' and I want to add all the nice autopopulated fields Illustration and Photograph enjoy.
>
> I tried copying the settings from the default Illustration element type (ID = 4) to a new entry in the field_type table associating my inline_image element_type__id. Sadly I got this error:
>
> ERROR: duplicate key violates unique constraint "udx_field_type__key_name__et_id"
>
> And yet the Photograph element_type also shares a 'width' key_name field element with Illustration.
>
> I thought there was documentation on this but I can't find it.

Make sure that the media type is "image" in the element type admin interface.

Best,

David
Re: how to make new autopopulated image field_types via db? [ In reply to ]
On Jun 17, 2011, at 11:09 AM, Dawn Buie wrote:

> Hi all
>
> I have a new image element type 'inline_image' and I want to add all the nice autopopulated fields Illustration and Photograph enjoy.
>
> I tried copying the settings from the default Illustration element type (ID = 4) to a new entry in the field_type table associating my inline_image element_type__id. Sadly I got this error:
>
> ERROR: duplicate key violates unique constraint "udx_field_type__key_name__et_id"
>
> And yet the Photograph element_type also shares a 'width' key_name field element with Illustration.
>
> I thought there was documentation on this but I can't find it.

Make sure that the media type is "image" in the element type admin interface.

Best,

David
Re: how to make new autopopulated image field_types via db? [ In reply to ]
On 2011-06-17, at 2:17 PM, David E. Wheeler wrote:
>>
>
> Make sure that the media type is "image" in the element type admin interface.

It is!

Dawn

>
> Best,
>
> David
>
Re: how to make new autopopulated image field_types via db? [ In reply to ]
The odd thing is looking at another bricolage install of mine I see I did successfully do this before (both are version 2.0.1 now). But I've tried adding a 'width' field to 2 new image content types in my new bricolage install using the web interface as well as the database and I keep getting errors.

Via the web I get:

The "width" field type already exists. Please try another key name.



On 2011-06-17, at 2:22 PM, Dawn Buie wrote:

>
>
> On 2011-06-17, at 2:17 PM, David E. Wheeler wrote:
>>>
>>
>> Make sure that the media type is "image" in the element type admin interface.
>
> It is!
>
> Dawn
>
>>
>> Best,
>>
>> David
>>
>
Re: how to make new autopopulated image field_types via db? [ In reply to ]
On Jun 17, 2011, at 11:36 AM, Dawn Buie wrote:

> The odd thing is looking at another bricolage install of mine I see I did successfully do this before (both are version 2.0.1 now). But I've tried adding a 'width' field to 2 new image content types in my new bricolage install using the web interface as well as the database and I keep getting errors.
>
> Via the web I get:
>
> The "width" field type already exists. Please try another key name.

Yeah, those fields are auto-generated for you. No idea why they're not showing up. Have they somehow been disabled in the database?

Best,

David
Re: how to make new autopopulated image field_types via db? [ In reply to ]
On 2011-06-17, at 2:37 PM, David E. Wheeler wrote:

> On Jun 17, 2011, at 11:36 AM, Dawn Buie wrote:
>
>> The odd thing is looking at another bricolage install of mine I see I did successfully do this before (both are version 2.0.1 now). But I've tried adding a 'width' field to 2 new image content types in my new bricolage install using the web interface as well as the database and I keep getting errors.
>>
>> Via the web I get:
>>
>> The "width" field type already exists. Please try another key name.
>
> Yeah, those fields are auto-generated for you. No idea why they're not showing up. Have they somehow been disabled in the database?

In what table could they be disabled?

To repeat, I'm starting with new Image content_types then attempting to add a new text field of key name: width. There's nothing I could have disabled at this stage.

I DID delete the Illustration and Photograph element types at first (disabled in database) because I want different names for my image types, but I made them active again to make sure their 'width' fields were working, and they are.
>
> Best,
>
> David
>
Re: how to make new autopopulated image field_types via db? [ In reply to ]
OK - as a test - I made a new image content type on the bricolage install in which I had successfully added autopop fields in the past. Via the web I tried adding a width field and got the same error.

>>> The "width" field type already exists. Please try another key name.

Should I be able to add this field name via the web or does it have to be done via the database? (As I say I can't remember how I did it before).

If I should be able to do this via the web interface perhaps the problem is a bug in 2.0.1?

Dawn

On 2011-06-17, at 2:45 PM, Dawn Buie wrote:

>
> On 2011-06-17, at 2:37 PM, David E. Wheeler wrote:
>
>> On Jun 17, 2011, at 11:36 AM, Dawn Buie wrote:
>>
>>> The odd thing is looking at another bricolage install of mine I see I did successfully do this before (both are version 2.0.1 now). But I've tried adding a 'width' field to 2 new image content types in my new bricolage install using the web interface as well as the database and I keep getting errors.
>>>
>>> Via the web I get:
>>>
>>> The "width" field type already exists. Please try another key name.
>>
>> Yeah, those fields are auto-generated for you. No idea why they're not showing up. Have they somehow been disabled in the database?
>
> In what table could they be disabled?
>
> To repeat, I'm starting with new Image content_types then attempting to add a new text field of key name: width. There's nothing I could have disabled at this stage.
>
> I DID delete the Illustration and Photograph element types at first (disabled in database) because I want different names for my image types, but I made them active again to make sure their 'width' fields were working, and they are.
>>
>> Best,
>>
>> David
>>
>
Re: how to make new autopopulated image field_types via db? [ In reply to ]
On Jun 17, 2011, at 11:45 AM, Dawn Buie wrote:

> In what table could they be disabled?

field_type

> To repeat, I'm starting with new Image content_types then attempting to add a new text field of key name: width. There's nothing I could have disabled at this stage.

You should not have to add that field. It should be created for you.

Best,

David
Re: how to make new autopopulated image field_types via db? [ In reply to ]
On Jun 17, 2011, at 11:54 AM, Dawn Buie wrote:

> OK - as a test - I made a new image content type on the bricolage install in which I had successfully added autopop fields in the past. Via the web I tried adding a width field and got the same error.
>
>>>> The "width" field type already exists. Please try another key name.
>
> Should I be able to add this field name via the web or does it have to be done via the database? (As I say I can't remember how I did it before).
>
> If I should be able to do this via the web interface perhaps the problem is a bug in 2.0.1?

You should not have to create this field at all. Bricolage should create it for you.

Best,

David
Re: how to make new autopopulated image field_types via db? [ In reply to ]
Yeah I think this might be a bug in 2.0.1 because I obviously did it in my old LRC site - but now cannot - and the LRC install has been upgraded to 2.0.1 as well.

I could enter it as a bug. I haven't tried the new system yet.

Dawn


On 2011-06-27, at 12:55 PM, David E. Wheeler wrote:

> On Jun 17, 2011, at 11:45 AM, Dawn Buie wrote:
>
>> In what table could they be disabled?
>
> field_type
>
>> To repeat, I'm starting with new Image content_types then attempting to add a new text field of key name: width. There's nothing I could have disabled at this stage.
>
> You should not have to add that field. It should be created for you.
>
> Best,
>
> David
>