<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://pkp.sfu.ca/bugzilla/bugzilla.dtd">

<bugzilla version="4.2.5+"
          urlbase="http://pkp.sfu.ca/bugzilla/"
          
          maintainer="pkp-hosted@sfu.ca"
>

    <bug>
          <bug_id>4123</bug_id>
          
          <creation_ts>2009-03-11 14:05:00 -0700</creation_ts>
          <short_desc>Harvesting MODS archives produces &quot;Invalid argument supplied for foreach()&quot; error</short_desc>
          <delta_ts>2009-03-11 18:49:59 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>OHS</product>
          <component>Indexing</component>
          <version>2.3.1</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Jordan">mjordan</reporter>
          <assigned_to name="Alec Smecher">alec</assigned_to>
          <cc>pkp-support</cc>
          
          

      

      

      

          <long_desc isprivate="0">
            <commentid>13979</commentid>
            <who name="Mark Jordan">mjordan</who>
            <bug_when>2009-03-11 14:05:31 -0700</bug_when>
            <thetext>Harvesting MODS archives using harvest.php produces the following error:

&quot;PHP Warning:  Invalid argument supplied for foreach() in /mnt/u0/var/www/html/chodarr-test/lib/pkp/classes/xml/XMLNode.inc.php on line 138&quot;

Records are added but they are empty (more specifically, nothing is showing up in the browse list but a link to view record, and the record itself is empty.

The error message does not appear when harvesting via the web interface, but the result is the same -- empty records.

Harvesting DC and ETD-MS archives works as expected. The MODS archives (they are actually static repositories at http://harvesters.sfu.ca/static_repositories/) that are producing the error/not populating records posed no problems in Harvester 2.0.1.0 Harvester. The DC and ETD-MS archives I tested were not static repositories.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>13984</commentid>
              <attachid>1568</attachid>
            <who name="Alec Smecher">alec</who>
            <bug_when>2009-03-11 18:48:32 -0700</bug_when>
            <thetext>Created attachment 1568
Patch against Harvester pre-2.3.1 CVS</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>1568</attachid>
            <date>2009-03-11 18:48:00 -0700</date>
            <delta_ts>2009-03-11 18:48:32 -0700</delta_ts>
            <desc>Patch against Harvester pre-2.3.1 CVS</desc>
            <filename>4123.diff</filename>
            <type>text/plain</type>
            <size>616</size>
            <attacher>alec</attacher>
            
              <data encoding="base64">SW5kZXg6IHBsdWdpbnMvc2NoZW1hcy9tb2RzL01vZHNQbHVnaW4uaW5jLnBocAo9PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
ClJDUyBmaWxlOiAvY3ZzL2hhcnZlc3RlcjIvcGx1Z2lucy9zY2hlbWFzL21vZHMvTW9kc1BsdWdp
bi5pbmMucGhwLHYKcmV0cmlldmluZyByZXZpc2lvbiAxLjI2CmRpZmYgLXUgLXIxLjI2IE1vZHNQ
bHVnaW4uaW5jLnBocAotLS0gcGx1Z2lucy9zY2hlbWFzL21vZHMvTW9kc1BsdWdpbi5pbmMucGhw
CTQgRmViIDIwMDkgMTg6MDI6NTYgLTAwMDAJMS4yNgorKysgcGx1Z2lucy9zY2hlbWFzL21vZHMv
TW9kc1BsdWdpbi5pbmMucGhwCTEyIE1hciAyMDA5IDAxOjQ4OjExIC0wMDAwCkBAIC0xMjcsOSAr
MTI3LDEwIEBACiAJCQlyZXR1cm4gJHJldHVybmVyOwogCQl9CiAKKwkJJHJldHVybmVyID0mICR0
aGlzLT5oYW5kbGVSb290Tm9kZSgkbW9kc05vZGUpOworCiAJCSRyZXN1bHQtPmRlc3Ryb3koKTsK
IAkJJHhtbFBhcnNlci0+ZGVzdHJveSgpOwotCQkkcmV0dXJuZXIgPSYgJHRoaXMtPmhhbmRsZVJv
b3ROb2RlKCRtb2RzTm9kZSk7CiAKIAkJcmV0dXJuICRyZXR1cm5lcjsKIAl9Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>