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

GeminiLookup RequestException throws 500 error #1308

Closed
seth-shaw-unlv opened this issue Oct 14, 2019 · 2 comments
Closed

GeminiLookup RequestException throws 500 error #1308

seth-shaw-unlv opened this issue Oct 14, 2019 · 2 comments
Milestone

Comments

@seth-shaw-unlv
Copy link
Contributor

Created a new Audio Media which crashed when attempting to view it:

[Mon Oct 14 16:53:15.689600 2019] [php7:notice] [pid 6356] [client 10.0.2.2:51805] Error: Call to undefined method Drupal\\Core\\Logger\\LoggerChannel::warn() in /var/www/html/drupal/web/modules/contrib/islandora/src/GeminiLookup.php on line 147 #0 /var/www/html/drupal/web/modules/contrib/islandora/islandora.module(388): Drupal\\islandora\\GeminiLookup->lookup(Object(Drupal\\media\\Entity\\Media))
#1 [internal function]: islandora_entity_view(Array, Object(Drupal\\media\\Entity\\Media), Object(Drupal\\Core\\Entity\\Entity\\EntityViewDisplay), 'full')
...
#26 {main}, referer: http://localhost:8000/node/2/media
@seth-shaw-unlv
Copy link
Contributor Author

This error is simple to fix:

diff --git a/src/GeminiLookup.php b/src/GeminiLookup.php
index 20bd42e..657b3a4 100644
--- a/src/GeminiLookup.php
+++ b/src/GeminiLookup.php
@@ -144,7 +144,7 @@ class GeminiLookup {
       }
     }
     catch (RequestException $e) {
-      $this->logger->warn(
+      $this->logger->warning(
         "Error performing Gemini lookup for media. Fedora HEAD to @url returned @status => @message",
         [
           '@url' => $urls['fedora'],

But it also masked another problem: the audio file never made it to Fedora in the first place. It looks like a file-name issue. I'll test some more.

@seth-shaw-unlv seth-shaw-unlv changed the title 500 error when viewing new Audio Media GeminiLookup RequestException throws 500 error Oct 16, 2019
@seth-shaw-unlv seth-shaw-unlv added this to the 1.1.0 milestone Jan 29, 2020
ruebot added a commit to yorkulibraries/islandora that referenced this issue Feb 7, 2020
dannylamb pushed a commit to Islandora/islandora that referenced this issue Feb 7, 2020
@dannylamb
Copy link
Contributor

Resolved via Islandora/islandora@6d54ff9

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

No branches or pull requests

2 participants