Closed DonRichards closed 1 year ago
Plugin tested in a forked codebase with PHP 8.1, Symfony 5.4 (the fork has a few fixed deprecations but shouldn't impact the plugin.
@DonRichards @jefferya OK to merge into main?
I'll leave that question to Jeffery. I assume he's testing it.
Works for me! Thanks all!
Thanks to both of you!
I DO NOT KNOW IF THIS WILL WORK.
This is untested.
I wrote this without having it installed locally. This came from a conversation from slack https://islandora.slack.com/archives/C019U12D44Q/p1674063587768829
The problem
Curl a media object, and it doesn't return the expected
$media['field_media_file'][0]['url']
curl -i -X GET 'https://sandbox.islandora.ca/media/107?_format=json'
In AddMedia Line 67-71 it does an "if" statement but not a lookup.
This PR shows a possible solution. It extends the checks, and the fallback does an entity file lookup from the media.
Sorry, in advance. I didn't review this module or test this code to see if it works prior to submitting the PR. I hope this helps in either providing a solution or clarity to the person reporting the initial issue in Slack.