I have ris files of citations to upload, and despite having titles mapped correctly at admin/config/content/biblio/iomap/edit/ris -- T1 goes to Title, I get nothing but "untitled" nodes. I am using version 7.x-1.0-rc7. Some other data seems to populate appropriately, but looking at logs, many things aren't, so it's more than just titles. I have a large number of errors for a number of fields along the lines of:
Notice: Undefined property: stdClass::$title in _biblio_ris_parse_line() (line 357 of C:\wamp\www\mysite\sites\all\modules\biblio\modules\RIS\biblio_ris.module).
Thinking there might be something wrong with the data, I created my own simple ris file and tried an example file that I found online. I had the same problems with all of them.
I tried the dev version and have the same problem.
Any help would be appreciated.
Comment | File | Size | Author |
---|---|---|---|
#12 | biblio-importing-ris-files-2619626-12.patch | 823 bytes | byronveale |
Issue fork biblio-2619626
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mattrweaver CreditAttribution: mattrweaver commentedActually, I made have fixed it, thanks to an idea from this comment.
I changed two lines in biblio_ris.module:
339 from
$node->biblio_pages .= ($tag == "SP") ? $data : " - " . $data;
to
$node->biblio_pages = ($tag == "SP") ? $data : " - " . $data;
and 357, from:
$node->$field .= $data;
to
$node->$field = $data;
I've never written a patch before, but I'll give it a shot.
Comment #3
rjerome CreditAttribution: rjerome commentedCould you attach a RIS file that generates this error (no title), I would like to take a look at it.
Comment #4
mattrweaver CreditAttribution: mattrweaver commentedI used this one:
http://www.refbase.net/index.php/Import_Example:_RIS
Comment #5
mattrweaver CreditAttribution: mattrweaver commentedand while I got title to work, some other fields aren't like Pubmed id.
Comment #6
rjerome CreditAttribution: rjerome commentedI imported that Refbase example RIS file without issue, so I'm guessing your issue may be related to the PHP version or settings that you are using.
Can you elaborate on your PHP version and the platform its running on?
Comment #7
mattrweaver CreditAttribution: mattrweaver commentedI had started to think this was likely the issue. I am running 5.5.12 (wampserver). I also had trouble with 5.6 (xampp). And I won't bother with the patch, then
Comment #8
mattrweaver CreditAttribution: mattrweaver commentedokay, tried php5.4 and it works. Thanks
Comment #9
HunterElliott CreditAttribution: HunterElliott commentedJust an FYI, I'm also getting this error on PHP Version 5.5.9-1ubuntu4.14
Comment #11
pdau2571 CreditAttribution: pdau2571 commentedHello,
I've got same problem: all fields of RIS file except Pub Date and authors are not imported. Log file of DRUPAL displays this message:
Notice: Undefined property: stdClass::$title in _biblio_ris_parse_line() (line 357 of /path/to/site/sites/all/modules/biblio/modules/RIS/biblio_ris.module).
Same message for other biblio_fields.
A previous message states that this error is due to PHP version. Any idea about how to solve this issue without modifying PHP version?
Thanks,
Pierre
Comment #12
byronveale CreditAttribution: byronveale commentedI too got a bunch of errors when attempting to create a Biblio node using RIS code, like this:
Notice: Undefined property: stdClass::$ in _biblio_ris_parse_line() (line <339 or 357> of …/biblio/modules/RIS/biblio_ris.module).
And we're on PHP 5.6.something.
Matt's suggested fix in comment #2 worked for me, so uploading a patch.
Comment #15
byronveale CreditAttribution: byronveale at Princeton University for Princeton University commented