When I create a custom biblio type and then create a new node with this type, I get the following error (4 times):
warning: Invalid argument supplied for foreach() in /includes/form.inc on line 1417

The problems seems to be with the Author/Contributors: 4 author fields appear, but the author 'type' select list is empty.
When I click 'More authors', the 5th author field is correct (with author types available), and no extra errors appear.

Comments

Frank Steiner’s picture

Status: Active » Needs review
StatusFileSize
new721 bytes

When creating a new type, biblio_admin_types_add_form_submit forgets to set the values for the author types. Please try the attached patch. It's not complete because it doesn't delete the values when the type is deleted again, but that causes just unneccessary rows in the table, so it doesn't hurt that much. Didn't have time for more now. Hope this helps.

cu,
Frank

setack’s picture

It works but now the page is reloaded several times (about 10 times or so) very quickly after the page is loaded when editing a biblio entry.

Frank Steiner’s picture

I don't understand what you mean here. Does it happen when you edit an existing entry? And how do you see that the page is reloaded 10 times? I don't see anything similar, so I can't imagine what is happening. PLease try to describe in more detail.

setack’s picture

Yes, it happens when i edit an existing entry. Just after clicking on to the edit tab, the edit page is loaded correctly but at the end (after the page is loaded), i see at the bottom-right of firefox a progress bar reloading very quickly and my mouse pointer converting from a normal pointer to a pointer + wheel which means that the application is thinking (reloading....) back and forth. It's far from a scientific explanation, i know :-) And when i say 10 it's an arbitrary number because i can't count how many times the page is reloaded but may be more.

Checked with ubuntu (firefox) and windows (firefox, chrome).

Frank Steiner’s picture

This is strange because the patch just writes a record to the DB when a custom type is created.

With which biblio entries does it happen? With a custom type created by you before or after you applied the patch? Or with any biblio type?

I don't see this behavious with any biblio entry (not even with custom types I created after applying the patch), neither with FF nor with Opera, neither in Windows nor in SLED 10. So I'm not sure what happens here...

rjerome’s picture

Status: Needs review » Fixed

Committed to CVS...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.