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

Attempting to delete a datastream that has a derivative defined of itself fails

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.x-1.11
    • Labels:
      None

      Description

      It's possible to define a derivative with a source_dsid and destination_dsid being equivalent. For example a MODS derivative that adds an identifier only if the identifier does not already exist in the MODS (has a terminating condition so it does not loop endlessly).

      When attempting to delete a datastream the form attempts to get a list of related derivatives to given the user an option to delete any related derivatives if they see fit. With the current code this will cause non-terminating recursion.

       

      Test case:
      Define a derivative hook implementation defined with the source_dsid and destination_dsid being equivalent (https://gist.github.com/jordandukart/b488ea8bdfe62a90754f9578ece1acb0 for an example).
      If using the example Gist create a new datastream 'TEST' using the txt file as the content by going to /islandora/object/pid/manage/datastreams/add.
      Navigate to /islandora/object/pid/datastream/TEST/delete
      Note that you get a white screen with a recursion error.
      Pull code attempt again, things work as expected.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jordandukart Jordan Dukart
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: