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.

Issue fork biblio-2619626

Command icon 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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mattrweaver created an issue. See original summary.

mattrweaver’s picture

Actually, 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.

rjerome’s picture

Could you attach a RIS file that generates this error (no title), I would like to take a look at it.

mattrweaver’s picture

mattrweaver’s picture

and while I got title to work, some other fields aren't like Pubmed id.

rjerome’s picture

I 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?

mattrweaver’s picture

I 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

mattrweaver’s picture

okay, tried php5.4 and it works. Thanks

HunterElliott’s picture

Just an FYI, I'm also getting this error on PHP Version 5.5.9-1ubuntu4.14

pdau2571’s picture

Hello,
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

byronveale’s picture

Version: 7.x-1.0-rc7 » 7.x-1.x-dev
Category: Support request » Bug report
Status: Active » Needs review
FileSize
823 bytes

I 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.

Status: Needs review » Needs work

The last submitted patch, 12: biblio-importing-ris-files-2619626-12.patch, failed testing. View results

byronveale’s picture

Status: Needs work » Needs review