Import: Invalid argument supplied for foreach() in biblio.import.export.inc on line 267

nicomat - September 22, 2009 - 15:24
Project:Bibliography Module
Version:6.x-1.6
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi,

when trying to import a BiBTeX file via /biblio/import I get the error message

Invalid argument supplied for foreach() in biblio.import.export.inc on line 267

and no nodes are imported.

Cheers,
Nico

#1

rjerome - September 22, 2009 - 16:03

Must be a problem with the file, could you post it here, or contact me via my contact page.

Ron.

#2

nicomat - September 23, 2009 - 19:28

Hi,

there were duplicate entries in the BibTeX list which I think caused the problem -- at least I get no such error anymore when removing the duplicates.

That's easily fixed, but I suppose it'd still be worthwhile adding some more verbose error or warning about this into the module.

Cheers,
Nico

#3

rjerome - September 25, 2009 - 11:46

The duplicates themselves shouldn't have caused the problem, I suspect there was something else going on in that file as well. If you send me a copy, maybe I can figure out what the problem was.

Ron.

#4

nicomat - September 27, 2009 - 19:47

Alright, so here you go! :)

(had to rename the file to .txt to work-around upload restrictions)

AttachmentSize
Biblio-Bibtex-corrupted.txt 14.85 KB

#5

jayakawale - October 2, 2009 - 16:26

Hi,

I face the same problem when I upload an RIS file. I get the same error. What could the issue be ? I am sure I have no duplicates.

Thanks,
Jaya

#6

rjerome - October 3, 2009 - 00:52

I was able to import the file, BUT I have to admit that the first time I tried, I forgot to select the file type (BibTex) and it produced the error you mention. It seems to me an error used to be generated if you didn't select a file type, I have to look to see what happened to that.

Ron.

#7

rjerome - October 3, 2009 - 01:27

Ok, I fixed the form so that an error is generated if no file type is supplied.

http://drupal.org/cvs?commit=270512

#8

jayakawale - October 9, 2009 - 00:53

Hi Ron,

Please find attached my RIS file. I selected RIS but somehow always get an error when I do bulk imports. Can you please help me with this.

Thanks,
Jaya

AttachmentSize
bibliography.ris_.txt 453.47 KB

#9

rjerome - October 9, 2009 - 12:42

Hi Jaya,

That is not a well formed RIS file. There should be two spaces before the "-" character separating the tag from the data...

Your file has:

TY - UNPB
TI - Quantifying Quantitative Literacy: Age Heaping and the History of Human Capital
AU - A'Hearn,Brian
AU - Baten,Joerg
AU - Crayen,Dorothee
CY -
ER -

it should be:

TY  - UNPB
TI  - Quantifying Quantitative Literacy: Age Heaping and the History of Human Capital
AU  - A'Hearn,Brian
AU  - Baten,Joerg
AU  - Crayen,Dorothee
CY  -
ER  -

What software produced that file?

Ron.

#10

adamjosef - October 20, 2009 - 12:17

Hi Ron,

I have the same problem as the guy in the first post. I have new, clean install of drupal and biblio, clean bibtex database with no duplicates (about 1500 entries) and I cannot import it at all. Without batch processing my server goes down with internal server error and with batch its line 286 (271 in dev version) problem in biblio.import.export.inc.
Database is uploaded but no nodes were saved... Im sending you link to that bibtex database via your contact page. Any help greatly appreciated. Thank you.

 
 

Drupal is a registered trademark of Dries Buytaert.