Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-2578

Old communities2item browse table blocks ability to delete non-empty Collections

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 5.0, 5.1, 5.2
    • Fix Version/s: 6.0
    • Component/s: DSpace API
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      6
    • Documentation Status:
      Not Required

      Description

      Just ran into this issue, but it seems like it's been reported in several past threads on dspace-tech:

      It seems like the communities2item table is no longer utilized when using Discovery. But, constraints on that table block the ability to delete a Collection which contains Items.

      Here's the error message that is displayed:
      ERROR: update or delete on table "item" violates foreign key constraint "communities2item_item_id_fkey" on table "communities2item" Detail: Key (item_id)=([#]) is still referenced from table "communities2item".

      As far as I can tell, this table looks like it should no longer be used (as long as you are using Discovery), so the bug seems related to DS-2188 (in that the table should be removed once traditional browse support is also removed).

      The "quick fix" if you encounter this bug is to simply remove all content from that communities2item table by running the following SQL:

      DELETE from communities2item;

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tdonohue Tim Donohue
                Reporter:
                tdonohue Tim Donohue
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: