It's fairly common to find publications without authors -- for example, newspaper articles. The citation formats I'm familiar with frown on using terms like "Anon." to indicate that there is no author; the author's name should simply be left out.

However, the Bibliography module apparently doesn't let you create an entry without an author. One reason I consider this is a bug is that you can edit the "Author" field in common field types, and remove the "Required" flag. However, this doesn't actually do anything, as there is a test in biblio.module (biblio_validate() function):

 if (!$node->biblio_authors) {
    form_set_error('biblio_authors', t('You must supply at least one author name
'));

How can I get around this?

CommentFileSizeAuthor
#7 biblio.patch607 bytesjohn bickar

Comments

rjerome’s picture

Hmm, good point, I'll fix that.

Ron.

pathscollide’s picture

Hi Ron -- You're providing an amazing level of support for this module!

How would you recommend getting around this issue (i.e. how could I patch it) -- or could you let us know when you've patched the 4.7-dev branch? Is the latter basically safe to use?

Thanks!

rjerome’s picture

If you just comment out those lines like this...

/*
  if (!$node->biblio_authors) {
    form_set_error('biblio_authors', t('You must supply at least one author name'));
  }
*/ 

it should work without authors.
Ron.

john bickar’s picture

I tried commenting out the lines you suggested, and I still cannot create a publication without an author. In my instance, I have imported publications from RefWorks (RIS format), and I have one without an author. When I got to change the publication type to a custom type (Journal) that I created, it will not let me change to that type without filling in the author(s) field. I get the following error message: "Authors field is required."

When I try unchecking the "required" checkbox in Biblio Settings>Type customization, the "required" checkbox re-checks itself after I save.

I'm using the 5.x dev version, BTW.

Thanks for all your hard work - Biblio is an awesome module!

john bickar’s picture

EEBKC*

Administer>Site configuration>Biblio settings>Field defaults

Need to uncheck the author field's "required" checkbox for the biblio module as a whole before you can uncheck it for individual types.

:D

*(Error Exists Between Keyboard and Chair)

pathscollide’s picture

Version: 4.7.x-2.6 » 5.x-1.4

This inconvenient little bug still exists in the Drupal 5 branch.

john bickar’s picture

Version: 5.x-1.4 » 5.x-1.9
Status: Active » Needs review
StatusFileSize
new607 bytes

Patch attached for Drupal 5.3, Biblio 5.x-1.9.

Helmut Neubauer’s picture

Version: 5.x-1.9 » 5.x-1.13

I've still the problem if I use the author field as common (not required).

Anonymous’s picture

subscribing

bekasu’s picture

Upgrade to Biblio 6x.
Marking issue closed.

rjerome’s picture

Status: Needs review » Closed (fixed)