Browse Source

Merge pull request #787 from dannylamb/iiif-manifest-fix-no-cantaloupe

Handling case where IIIF manifest generation fails if cantaloupe is down
pull/790/head
Don Richards 4 years ago committed by GitHub
parent
commit
ef98cdaee7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      modules/islandora_iiif/src/Plugin/views/style/IIIFManifest.php

8
modules/islandora_iiif/src/Plugin/views/style/IIIFManifest.php

@ -12,6 +12,7 @@ use Drupal\Core\Config\ImmutableConfig;
use Drupal\Core\File\FileSystem;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ClientException;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\ServerException;
/**
@ -190,11 +191,7 @@ class IIIFManifest extends StylePluginBase {
$width = $resource['width'];
$height = $resource['height'];
}
catch (ClientException $e) {
}
catch (ServerException $e) {
}
catch (ClientException | ServerException | ConnectException $e) {
// If we couldn't get the info.json from IIIF
// try seeing if we can get it from Drupal.
if (empty($width) || empty($height)) {
@ -215,6 +212,7 @@ class IIIFManifest extends StylePluginBase {
}
}
}
}
$canvases[] = [
// @see https://iiif.io/api/presentation/2.1/#canvas

Loading…
Cancel
Save