Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix orphaned media view filter. #62

Merged
merged 2 commits into from
Feb 28, 2023
Merged

Conversation

rosiel
Copy link
Contributor

@rosiel rosiel commented Feb 27, 2023

This addresses #34 .

Previously, the "orphaned" filter found items where media_of was not set.
However, the most likely "orphan" case is when a node is deleted, and then media_of remains set but does not link to a real node.

This new filter for "Orphans" finds both:

  • media with no media_of
  • media where media_of is internally set to a non-existent node.

I've had a bit of trouble trying to get the nid of the deleted node to display transparently to the user. This is really difficult! Drupal does a lot of work to hide from you the fact that there is a referenced entity which does not exist.

Nonetheless, this change addresses "Finding orphans" which are being missed by the current view.

@rosiel rosiel merged commit 7537098 into Islandora-Devops:main Feb 28, 2023
@rosiel rosiel deleted the orphan-media branch February 28, 2023 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant