Issue with generating PDF through snippet pdfThumb from a static Media browser source

Summary

We use a snippet to generate Thumbnails of existing static pdf files. The problem we run into now is that the snippet does not function on the new pdf files that are uploaded in 2021. The pdf files from 2019 however are still able to be generated properly.

Example:
If we make it generate a thumbnail from the new pdf files → it breaks and we get a white screen or HTTP 500 error.
If we make it generate a thumbnail from the 2019 pdf files → it works as it should.
We have tested it to the point where the PDF file is the only variable we change between a working page and a broken page. Everything else is the same.

P.s. we checked r/w permissions. They are the same for both paths.
P.s.s it almost looks as if something in the PDF itself breaks something but to us, this looks unlikely.

Step to reproduce

Reproducing it would require a lot of custom code to be handed out. And we already checked it to the point where code is ruled out. The same exact code is used for both the working method as well as the method where it breaks. They are 1 on 1 absolutely the same. The only variables that we are not 100% sure to rule out:

  1. Path to the PDF
  2. PDF file itself

Observed behavior

The following screenshots is how we currently have it working with a hotfix.




Now if we change the Page Image to the actual path where the PDF is located, as shown below in the first print screen. Then the website breaks as shown below.


This little thumbnail you see here is not shown when the website is ‘‘broken’’. But as you see here (with hotfix pre-generated static images) it works.

Expected behavior

When we normally put a new pdf file path in the ‘Page Image’ it simply generates the thumbnail as shown in the last shown print screen above. But for some reason, these 2021 pdf files seem to break the system. As stated previously, it works when using old PDFs and paths.

Environment

Modx Revolution 2.8.1-pl on apache environment.
The only Extra we have installed on this environment is:

Thank you for taking the time to look at this. Hoping someone has solved this in the past or knows where we might be going wrong.

  • What is the difference between the “pdf files from 2019” and the new ones? Is the PDF-Version different? Maybe check the version with Adobe Acrobat Reader.
  • There is usually a PHP error log (outside of MODx) that creates a log entry for 500 errors. What is the actual error message?
  • Is the snippet “pdfThumb” a custom snippet or from an extra? Your last screenshot only shows the Providers and not the Packages! If it is a custom snippet, how exactly do you create the thumbnail from the PDF?
  • So far as we can see, there is no difference in the PDF files. But I will check this again, as I just read your comment.
  • I will check if I can get that error log and if we have it on this website environment.
  • This is the ‘pdfThumb’ snippet. The reason I did not show the ‘Packages’ is that that section is empty. Sorry for leaving that comment out of the original post.

As your checking this, I will start looking for the other things you requested.

<?php
/**
 * mySnippet
 *
 * DESCRIPTION
 *
 * This snippet generates JPG files from PDF's
 *
 * PROPERTIES:
 *
 * &w width of the thumb
 * &h height of the thumb
 * &p pagenumber of the thumb
 *
 * USAGE:
 *
 * [[!mySnippet? &x=`5` &y=`7`]]
 *
 */

error_reporting(E_ALL);
#ini_set("display_errors", 1);

$file =  $modx->getOption('f', $scriptProperties);
$width =  ($modx->getOption('w', $scriptProperties) ? $modx->getOption('w', $scriptProperties) : 0 );
$height =  ($modx->getOption('h', $scriptProperties) ? $modx->getOption('h', $scriptProperties) : 0 );
$page =  ($modx->getOption('p', $scriptProperties) ? $modx->getOption('p', $scriptProperties) : 0 );


if(!file_exists($file)){
	exit;
}

$directory = "adwise/pdfThumb/";

$hash = md5($file)."-".filemtime($file);

$thumbFile = $hash.".png";

if(file_exists($directory.$thumbFile)){
	return $directory.$thumbFile;
}else{
	$imagick = new Imagick($file.'['.$page.']');
	$imagick->resizeImage($width);
	//$imagick->cropImage ($width,$height,0,0);
	$imagick->setImageFormat('png');
	$imagick->writeImages($directory.$thumbFile , false);
	return $directory.$thumbFile;
}

Can you enclose your code with lines of three back-ticks to format it.

```//line with 3 back-ticks at the beginning
//your code here
```//line with 3 back-ticks at the end

It’s hard to read the code otherwise.

Done,

Also, find below the comparison between the 2 English versions of the old and new PDF. (old left, new right)


The only thing standing out is the Content Creator: Adobe InDesign version. 1 was made with 15.0 and the other with 16.3.

Will look into the PHP error log next.

It seems Adobe InDesign has gone through loads of fixes/changes since 15.0.
When I get home tonight, I’ll look through them and see if anything might interfere with this.

In the meantime, if you have any other suggestions for fixes I am all ears.

Also find the error log below:

[2021-08-17 11:17:29] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/phpthumb/modphpthumb.class.php : 177) Error outputting thumbnail:
OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 644
[2021-08-17 11:17:44] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/phpthumb/modphpthumb.class.php : 165) phpThumb was unable to generate a thumbnail for: /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/phpthumb/portal.nedap-luxon.com__src124e102c5f1bdcb900d65a8c8e0a49d8_par50a064df300e664cfff2fbd5ed8df8e3_dat1583483788.png
[2021-08-17 11:17:44] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/phpthumb/modphpthumb.class.php : 177) Error outputting thumbnail:
OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 644
[2021-08-17 11:17:55] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:17:55] (ERROR in resource 2 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:18:02] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/includes/elements/modsnippet/22.include.cache.php : 8) PHP warning: Illegal string offset 'service'
[2021-08-17 11:18:02] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:18:02] (ERROR in resource 2 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:18:06] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/includes/elements/modsnippet/22.include.cache.php : 8) PHP warning: Illegal string offset 'service'
[2021-08-17 11:18:06] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:18:06] (ERROR in resource 2 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:18:16] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/includes/elements/modsnippet/22.include.cache.php : 8) PHP warning: Illegal string offset 'service'
[2021-08-17 11:18:16] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:18:16] (ERROR in resource 2 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:18:26] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/phpthumb/modphpthumb.class.php : 165) phpThumb was unable to generate a thumbnail for: /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/phpthumb/portal.nedap-luxon.com__srccc69fe7e17060763d3b370e3db0877dc_par50a064df300e664cfff2fbd5ed8df8e3_dat1600077567.png
[2021-08-17 11:18:26] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/phpthumb/modphpthumb.class.php : 177) Error outputting thumbnail:
OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 644
[2021-08-17 11:18:32] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:18:32] (ERROR in resource 2 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:18:34] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:18:34] (ERROR in resource 33 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:18:34] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/includes/elements/modsnippet/1.include.cache.php : 201) context for 33 is web
[2021-08-17 11:18:34] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/includes/elements/modsnippet/1.include.cache.php : 427) SELECT `modResource`.`id`, `modResource`.`type`, `modResource`.`contentType`, `modResource`.`pagetitle`, `modResource`.`longtitle`, `modResource`.`description`, `modResource`.`alias`, `modResource`.`alias_visible`, `modResource`.`link_attributes`, `modResource`.`published`, `modResource`.`pub_date`, `modResource`.`unpub_date`, `modResource`.`parent`, `modResource`.`isfolder`, `modResource`.`introtext`, `modResource`.`richtext`, `modResource`.`template`, `modResource`.`menuindex`, `modResource`.`searchable`, `modResource`.`cacheable`, `modResource`.`createdby`, `modResource`.`createdon`, `modResource`.`editedby`, `modResource`.`editedon`, `modResource`.`deleted`, `modResource`.`deletedon`, `modResource`.`deletedby`, `modResource`.`publishedon`, `modResource`.`publishedby`, `modResource`.`menutitle`, `modResource`.`donthit`, `modResource`.`privateweb`, `modResource`.`privatemgr`, `modResource`.`content_dispo`, `modResource`.`hidemenu`, `modResource`.`class_key`, `modResource`.`context_key`, `modResource`.`content_type`, `modResource`.`uri`, `modResource`.`uri_override`, `modResource`.`hide_children_in_tree`, `modResource`.`show_in_tree`, `modResource`.`properties` FROM `modx_site_content` AS `modResource` WHERE  (  ( modResource.parent IN (33) AND `modResource`.`deleted` = 0 AND `modResource`.`published` = 1 AND `modResource`.`hidemenu` = 0 )  AND (EXISTS (SELECT 1 FROM `modx_site_tmplvar_contentvalues` tvr JOIN `modx_site_tmplvars` tv ON tvr.value LIKE 'yes' AND tv.name = 'showinoverview' AND tv.id = tvr.tmplvarid WHERE tvr.contentid = modResource.id) OR EXISTS (SELECT 1 FROM `modx_site_tmplvars` tv WHERE tv.name = 'showinoverview' AND tv.default_text LIKE 'yes' AND tv.id NOT IN (SELECT tmplvarid FROM `modx_site_tmplvar_contentvalues` WHERE contentid = modResource.id)) ) )  ORDER BY menuindex ASC LIMIT 10 
[2021-08-17 11:18:36] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:18:36] (ERROR in resource 874 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:18:37] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/includes/elements/modsnippet/22.include.cache.php : 8) PHP warning: Illegal string offset 'service'
[2021-08-17 11:18:37] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:18:37] (ERROR in resource 2 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:18:43] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:18:43] (ERROR in resource 874 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:18:48] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:18:48] (ERROR in resource 874 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:18:57] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/includes/elements/modsnippet/22.include.cache.php : 8) PHP warning: Illegal string offset 'service'
[2021-08-17 11:18:57] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:18:57] (ERROR in resource 2 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:19:15] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/includes/elements/modsnippet/22.include.cache.php : 8) PHP warning: Illegal string offset 'service'
[2021-08-17 11:19:15] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:19:15] (ERROR in resource 2 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:19:30] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/phpthumb/modphpthumb.class.php : 165) phpThumb was unable to generate a thumbnail for: /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/phpthumb/portal.nedap-luxon.com__src39e8ff73deab6908ba354c2586a55fb0_par50a064df300e664cfff2fbd5ed8df8e3_dat1627979110.png
[2021-08-17 11:19:30] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/phpthumb/modphpthumb.class.php : 177) Error outputting thumbnail:
OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 644
[2021-08-17 11:19:34] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:19:34] (ERROR in resource 874 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:19:37] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:19:37] (ERROR in resource 33 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:19:37] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/includes/elements/modsnippet/1.include.cache.php : 201) context for 33 is web
[2021-08-17 11:19:37] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/includes/elements/modsnippet/1.include.cache.php : 427) SELECT `modResource`.`id`, `modResource`.`type`, `modResource`.`contentType`, `modResource`.`pagetitle`, `modResource`.`longtitle`, `modResource`.`description`, `modResource`.`alias`, `modResource`.`alias_visible`, `modResource`.`link_attributes`, `modResource`.`published`, `modResource`.`pub_date`, `modResource`.`unpub_date`, `modResource`.`parent`, `modResource`.`isfolder`, `modResource`.`introtext`, `modResource`.`richtext`, `modResource`.`template`, `modResource`.`menuindex`, `modResource`.`searchable`, `modResource`.`cacheable`, `modResource`.`createdby`, `modResource`.`createdon`, `modResource`.`editedby`, `modResource`.`editedon`, `modResource`.`deleted`, `modResource`.`deletedon`, `modResource`.`deletedby`, `modResource`.`publishedon`, `modResource`.`publishedby`, `modResource`.`menutitle`, `modResource`.`donthit`, `modResource`.`privateweb`, `modResource`.`privatemgr`, `modResource`.`content_dispo`, `modResource`.`hidemenu`, `modResource`.`class_key`, `modResource`.`context_key`, `modResource`.`content_type`, `modResource`.`uri`, `modResource`.`uri_override`, `modResource`.`hide_children_in_tree`, `modResource`.`show_in_tree`, `modResource`.`properties` FROM `modx_site_content` AS `modResource` WHERE  (  ( modResource.parent IN (33) AND `modResource`.`deleted` = 0 AND `modResource`.`published` = 1 AND `modResource`.`hidemenu` = 0 )  AND (EXISTS (SELECT 1 FROM `modx_site_tmplvar_contentvalues` tvr JOIN `modx_site_tmplvars` tv ON tvr.value LIKE 'yes' AND tv.name = 'showinoverview' AND tv.id = tvr.tmplvarid WHERE tvr.contentid = modResource.id) OR EXISTS (SELECT 1 FROM `modx_site_tmplvars` tv WHERE tv.name = 'showinoverview' AND tv.default_text LIKE 'yes' AND tv.id NOT IN (SELECT tmplvarid FROM `modx_site_tmplvar_contentvalues` WHERE contentid = modResource.id)) ) )  ORDER BY menuindex ASC LIMIT 10 
[2021-08-17 11:19:40] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/includes/elements/modsnippet/22.include.cache.php : 8) PHP warning: Illegal string offset 'service'
[2021-08-17 11:19:40] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:19:40] (ERROR in resource 2 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:19:52] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:19:52] (ERROR in resource 1237 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:19:56] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:19:56] (ERROR in resource 33 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:19:57] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/includes/elements/modsnippet/1.include.cache.php : 201) context for 33 is web
[2021-08-17 11:19:57] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/includes/elements/modsnippet/1.include.cache.php : 427) SELECT `modResource`.`id`, `modResource`.`type`, `modResource`.`contentType`, `modResource`.`pagetitle`, `modResource`.`longtitle`, `modResource`.`description`, `modResource`.`alias`, `modResource`.`alias_visible`, `modResource`.`link_attributes`, `modResource`.`published`, `modResource`.`pub_date`, `modResource`.`unpub_date`, `modResource`.`parent`, `modResource`.`isfolder`, `modResource`.`introtext`, `modResource`.`richtext`, `modResource`.`template`, `modResource`.`menuindex`, `modResource`.`searchable`, `modResource`.`cacheable`, `modResource`.`createdby`, `modResource`.`createdon`, `modResource`.`editedby`, `modResource`.`editedon`, `modResource`.`deleted`, `modResource`.`deletedon`, `modResource`.`deletedby`, `modResource`.`publishedon`, `modResource`.`publishedby`, `modResource`.`menutitle`, `modResource`.`donthit`, `modResource`.`privateweb`, `modResource`.`privatemgr`, `modResource`.`content_dispo`, `modResource`.`hidemenu`, `modResource`.`class_key`, `modResource`.`context_key`, `modResource`.`content_type`, `modResource`.`uri`, `modResource`.`uri_override`, `modResource`.`hide_children_in_tree`, `modResource`.`show_in_tree`, `modResource`.`properties` FROM `modx_site_content` AS `modResource` WHERE  (  ( modResource.parent IN (33) AND `modResource`.`deleted` = 0 AND `modResource`.`published` = 1 AND `modResource`.`hidemenu` = 0 )  AND (EXISTS (SELECT 1 FROM `modx_site_tmplvar_contentvalues` tvr JOIN `modx_site_tmplvars` tv ON tvr.value LIKE 'yes' AND tv.name = 'showinoverview' AND tv.id = tvr.tmplvarid WHERE tvr.contentid = modResource.id) OR EXISTS (SELECT 1 FROM `modx_site_tmplvars` tv WHERE tv.name = 'showinoverview' AND tv.default_text LIKE 'yes' AND tv.id NOT IN (SELECT tmplvarid FROM `modx_site_tmplvar_contentvalues` WHERE contentid = modResource.id)) ) )  ORDER BY menuindex ASC LIMIT 10 
[2021-08-17 11:19:58] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:19:58] (ERROR in resource 874 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:20:07] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/includes/elements/modsnippet/22.include.cache.php : 8) PHP warning: Illegal string offset 'service'
[2021-08-17 11:20:07] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:20:07] (ERROR in resource 2 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:20:55] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:20:55] (ERROR in resource 1237 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:20:59] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:20:59] (ERROR in resource 1241 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:21:34] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/includes/elements/modsnippet/22.include.cache.php : 8) PHP warning: Illegal string offset 'service'
[2021-08-17 11:21:34] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:21:34] (ERROR in resource 2 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:21:45] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/includes/elements/modsnippet/22.include.cache.php : 8) PHP warning: Illegal string offset 'service'
[2021-08-17 11:21:45] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:21:45] (ERROR in resource 2 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:22:06] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:22:06] (ERROR in resource 1241 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:22:09] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:22:09] (ERROR in resource 9 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:22:18] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:22:18] (ERROR in resource 800 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:22:22] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:22:22] (ERROR in resource 49 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:22:42] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/includes/elements/modsnippet/22.include.cache.php : 8) PHP warning: Illegal string offset 'service'
[2021-08-17 11:22:42] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:22:42] (ERROR in resource 2 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:23:25] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:23:25] (ERROR in resource 49 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:23:27] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/includes/elements/modsnippet/22.include.cache.php : 8) PHP warning: Illegal string offset 'service'
[2021-08-17 11:23:27] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:23:27] (ERROR in resource 2 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:23:54] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:23:54] (ERROR in resource 49 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:24:54] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/includes/elements/modsnippet/22.include.cache.php : 8) PHP warning: Illegal string offset 'service'
[2021-08-17 11:24:54] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:24:54] (ERROR in resource 2 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:27:29] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:27:29] (ERROR in resource 2 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:27:54] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:27:54] (ERROR in resource 49 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:31:28] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/includes/elements/modsnippet/22.include.cache.php : 8) PHP warning: Illegal string offset 'service'
[2021-08-17 11:31:29] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:31:29] (ERROR in resource 2 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:31:36] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/includes/elements/modsnippet/22.include.cache.php : 8) PHP warning: Illegal string offset 'service'
[2021-08-17 11:31:36] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:31:36] (ERROR in resource 2 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:31:42] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/includes/elements/modsnippet/22.include.cache.php : 8) PHP warning: Illegal string offset 'service'
[2021-08-17 11:31:42] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:31:42] (ERROR in resource 2 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:31:51] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/includes/elements/modsnippet/22.include.cache.php : 8) PHP warning: Illegal string offset 'service'
[2021-08-17 11:31:51] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:31:51] (ERROR in resource 2 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:32:10] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:32:10] (ERROR in resource 874 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered
[2021-08-17 11:32:22] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modx.class.php : 1031) `https` is not a valid integer and may not be passed to makeUrl()
[2021-08-17 11:32:22] (ERROR in resource 874 @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/modx/modparser.class.php : 1374) Bad link tag `[[!~https://portal.nedap-luxon.com/]]` encountered.   ```

I noticed an error that I haven't seen before. 

```[2021-08-17 11:17:29] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/phpthumb/modphpthumb.class.php : 177) Error outputting thumbnail:
OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 644
[2021-08-17 11:17:44] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/phpthumb/modphpthumb.class.php : 165) phpThumb was unable to generate a thumbnail for: /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/cache/phpthumb/portal.nedap-luxon.com__src124e102c5f1bdcb900d65a8c8e0a49d8_par50a064df300e664cfff2fbd5ed8df8e3_dat1583483788.png
[2021-08-17 11:17:44] (ERROR @ /home/nedapluxon/domains/portal.nedap-luxon.com/public_html/core/model/phpthumb/modphpthumb.class.php : 177) Error outputting thumbnail:
OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 644```

I'll look at this. 

So far --> Thank you for your help @halftrainedharry

The error log you posted is the log from MODx. 500 errors aren’t log in this file.
The location of the PHP error log depends on your server configuration. See the post below for more information.


As you use Imagick to create the thumbnails, it could also be helpful to know the version of Imagick on your system. Check phpinfo() for the information.


I highly doubt the version of Adobe InDesign has anything to do with this problem.

Hi @halftrainedharry,

Thank you again.

  1. Checked out the link. We will look into it and find the location on our end.
  2. Again, when 1. is finished, I will check that.
  3. I agree. I felt it was improbable. But until you gave me some new ideas, I was out of them.

I notice that your PDFs are a fair size (15MB), so it might be something as simple as Imagick timing out when processing the PDF. Are your new PDFs bigger than those generated in 2019, by any chance?

I ask this because we’ve had a nightmare with the repo-provided Imagick with Ubuntu 20.04, it was taking nearly 2 minutes to process a modestly large image vs seconds with php-gd. There’s something fundamentally screwed with the particular release we’d been using so we reverted to GD and the problem went away. Never bothered to investigate further.

Web server logs might give you more of a clue if that’s the case.

The old ones were between 11.3-11.6MB in size vs. the 15MB now.
So that is a solid 22% larger. When we revisit this issue tomorrow (when my colleague is back at the office, I will throw this in the mix.

I will let you guys know when we do find the problem, what it was. So that this thread might help others in the future.

Ticket has been resolved by applying the hotfix for now.
No additional work has been ordered. So permanent fix unsolved for now.