Skip to content

EAD Archive Export Subject terms issue #86

@tpwalsh

Description

@tpwalsh

We here at ISU have started to use the EAD Archive export regularly. We've found a major problem with the subject terms being incorrect when exporting all. This is happening with both of our installations of Archon. Each XML file in the exported ZIP file has the subject terms of the previous XML file and the correct terms. In other words the zip/xml tree looks like this:

  1. zip:
    • a.xml
      • subject terms
        • term A
        • term B
    • b.xml
      • subject terms
        • term A
        • term B
        • term C
    • c.xml
      • subject terms
        • term A
        • term B
        • term C
        • term D

Steps to reproduce:

  1. Select Export -> EAD Archive
  2. Click Launch
  3. Select any Repository(leave the classification on (Select One)
  4. Click Export

I was able to fix it(with a sledgehammer) via adding this on line 503 in packages/collections/templates/ead/collection.inc.php
$arrEADSubjects = null;

So that section would read like this:
`

  <?php
           if (!empty($objCollection->Subjects)) {
              $arrEADSubjects = null;
              foreach ($objCollection->Subjects as $objSubject) {
                 $arrTraversal = $_ARCHON->traverseSubject($objSubject->ID);
                 $objParent = reset($arrTraversal);

                 $arrEADSubjects[$objParent->SubjectType->ID][$objSubject->ID] = $objSubject->toString(LINK_NONE, true, ' -- ');
              }
           }

`
I'm not sure what other repercussions this fix will introduce though as I haven't done any testing other than the EAD export.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions