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
Must be a problem with the file, could you post it here, or contact me via my contact page.
Ron.
#2
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
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
Alright, so here you go! :)
(had to rename the file to
.txtto work-around upload restrictions)#5
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
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
Ok, I fixed the form so that an error is generated if no file type is supplied.
http://drupal.org/cvs?commit=270512
#8
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
#9
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 - UNPBTI - 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 - UNPBTI - 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
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.