Uploaded image for project: 'Islandora'
  1. Islandora
  2. ISLANDORA-1514

Updating a datastream for a multiple CMODEL Object , using XML Form, removes already present CMODEL




      This merged pull request, https://github.com/Islandora/tuque/pull/117 removes all cmodels that are not explicitly passed to the an object's "model" property (magic). Entities Solution Pack uses two CMODELs for their objects. On ingest, they get a second CMODEL added via hook call.

      XML forms uses:

      function xml_form_builder_update_object(AbstractObject $object, array $association, XMLDocument $document, $label = NULL)

      For updating Objects, called for Edits and Ingest

      and at:

      object->models is set from the association (assigned form for a cmodel). All existing cmodels are being removed and replaced by one (the associated to the form used to make the editing) braking the ability to have multiple cmodels in an Object and in specific Entities solution pack behaviour.

      Since the pull request that originated this behaviour doesn't has a JIRA ticket it would be pertinent to investigate if there could be other places where this new behaviour could break existing functionality.

      I made this a blocker because it breaks and/or changes behaviour of already working modules.

      Also, it's not clear if we should fix this on the xml_forms side?

      How to reproduce:

      1.- Create any Entity Solution Pack Object.
      2.- Check the RELS-EXT file created (Should have two CMODELS)
      3.- Edit the metadata datastream from that object using "edit" button in the datastream view in management tab
      4.- Submit the form (update)
      5.- Re-check the RELS-EXT. Only one CMODEL present.




            • Assignee:
              dpinokrayon Diego Pino Navarro
            • Votes:
              0 Vote for this issue
              5 Start watching this issue


              • Created: