Skip to content
Snippets Groups Projects
Commit d4e7e040 authored by jurgenhaas's avatar jurgenhaas
Browse files

Add debug patch to pdfpreview

parent ed46f62b
No related branches found
No related tags found
1 merge request!334Merging develop into main
......@@ -162,6 +162,9 @@
"drupal/name": {
"#3478278 Name and IEF": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3478278.diff"
},
"drupal/pdfpreview": {
"#local debug": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/pdfpreview-debug.diff"
},
"drupal/pluginreference": {
"#2979414 Allow no selection": "https://www.drupal.org/files/issues/2018-07-18/pluginreference-allow_no_plugin_to_be_selected-2979414-2.patch"
},
......
......@@ -158,6 +158,9 @@
"drupal/name": {
"#3478278 Name and IEF": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3478278.diff"
},
"drupal/pdfpreview": {
"#local debug": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/pdfpreview-debug.diff"
},
"drupal/pluginreference": {
"#2979414 Allow no selection": "https://www.drupal.org/files/issues/2018-07-18/pluginreference-allow_no_plugin_to_be_selected-2979414-2.patch"
},
......
diff --git a/src/Plugin/Field/FieldFormatter/PDFPreviewFormatter.php b/src/Plugin/Field/FieldFormatter/PDFPreviewFormatter.php
index 5b14b30..56b116b 100644
--- a/src/Plugin/Field/FieldFormatter/PDFPreviewFormatter.php
+++ b/src/Plugin/Field/FieldFormatter/PDFPreviewFormatter.php
@@ -208,7 +208,9 @@ class PDFPreviewFormatter extends ImageFormatter {
// Separate the PDF previews from the other files.
$show_preview = FALSE;
if ($file->getMimeType() == 'application/pdf') {
+ \Drupal::logger('pdf debug')->info('Calling imagick for file ' . $file->id());
$preview_uri = $this->pdfPreviewGenerator->getPDFPreview($file);
+ \Drupal::logger('pdf debug')->info('Succeeded');
$preview = $this->imageFactory->get($preview_uri);
if ($preview->isValid()) {
$show_preview = TRUE;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment