I'm the maintainer of a several Drupal websites for a large web presence at the University of California. We are trying to consolidate all of our Biblio instances down into one large Biblio database. We are talking about 30 different Biblio databases on several different Drupal web sites, as well as several EndNote collections that I was planning on converting to Biblio.

The problem seems to be that when I import and/or export, all the URLs and Attachments completely disappear. It would take us weeks (if not months) to reupload every single file, and at the very least I was hoping to be able to maintain the associations with the filenames on the old sites. However, when I do an import, everything in the section of the XML file is completely ignored. Below is an example. Is there any advice you can offer me?

Many thanks!

Everything in this section is ignored:

<urls>
        <related-urls>
          <url>
            <style face="normal" font="default" size="100%">http://www.mysite.com/sites/all/files/REPORT4820e.pdf</style>
          </url>
          <url>
            <style face="normal" font="default" size="100%">http://www.mysite.com/sites/all/files/PRESENTATION-4820e-ppt.pdf</style>
          </url>
          <url>
            <style face="normal" font="default" size="100%">http://www.mysite.com/sites/all/files/DATAFILE-4820e.xls</style>
          </url>
        </related-urls>
      </urls>

Comments

jibrille’s picture

Issue summary: View changes

Changed to indicate code

agerard’s picture

I see this issue has been unaddressed for a long time...I'm having the same problem with urls. My export is even simpler, as it's only one url:

<urls>
        <related-urls>
          <url>
            <style face="normal" font="default" size="100%">http://www.mysite.com/sites/all/files/REPORT4820e.pdf</style>
         </url>
      </related-urls>
</urls>

but nothing is being imported here, although I believe the field mapping (for EndNote X3 xml) is correct at "related-urls" > biblio_url - I can't really see any better alternative. I did try mapping it to another field, like biblio_short_title, as well as pruning the xml down to just

<related-urls>
      <style face="normal" font="default" size="100%">http://www.mysite.com/sites/all/files/REPORT4820e.pdf</style>
</related-urls>

but still no luck. There's clearly something wrong.

agerard’s picture

I don't know enough about creating/submitting patches, but this issue is fixed, at least for me, by editing the block of code beginning at line 277 in (version 7.x-1.0-rc7) biblio/modules/endnote/endnote_xml_parser.inc:
from:

        case 'urls' :
        case 'url' :
          switch ($this->urls) {
            case 'web-urls' :
              $this->node->biblio_url .= $data;
              break;
            case 'pdf-urls' :
            case 'text-urls' :
            case 'image-urls' :
              break;
            case 'related-urls' :
          }
          break;

to

        case 'urls' :
        case 'url' :
          switch ($this->urls) {
            //case 'web-urls' :
            case 'related-urls' :
              $this->node->biblio_url .= $data;
              break;
            case 'pdf-urls' :
            case 'text-urls' :
            case 'image-urls' :
              break;
          }
          break;

I realize this is totally not the right way to do this; if someone better versed in how to do things properly wants to address this in the correct way....

museumboy’s picture

I changed the importing XML file to have the tag rather than . This provides the same effect and you're not changing the module code.

liam morland’s picture

Status: Active » Closed (outdated)

This version is no longer maintained. If this issue is still relevant to the Drupal 7 version, please re-open and provide details.