We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8168
    • 1,118 Posts
    Hi guys,

    Noticed an inconsistent bug on Gallery 1.7 and Revo 2.3.3 - In that the creation of the thumbnail fails every now and again - particularly on Safari iOS... Instead of creating the thumb, I just see a broken image...

    Looking at error log. I have many error loops of the code below.

    I have a temporary fix to remove the use of the [[+thumbnail]] and replace with [[+image_absolute]] - but would rather have the thumbnails generated correctly by MODx... Any ideas on a fix???

    It seems to happen, after I click a thumbnail on iOS - I am using FancyApps to float the [[+image_absolute]] above the main page, then when I return to the main gallery page - the thumbnails all disapear and are shown as broken images - the error code as below then appears in the error log...

    Error logo code loop:

    [2015-03-11 14:46:59] (ERROR @ /assets/components/gallery/connector.php) [phpThumbOf] Could not generate thumbnail: /homepages/26/d523312972/htdocs/assets/gallery/1/[email protected] - Debug: Array
    (
        [0] => phpThumb() v1.7.13-201406261000 in file "phpthumb.class.php" on line 220
        [1] => ResolveFilenameToAbsolute() NOT prepending $this->config_document_root () to $filename (/assets/gallery/1/[email protected]) resulting in ($AbsoluteFilename = "/assets/gallery/1/[email protected]") in file "phpthumb.class.php" on line 1216
        [2] => resolvePath: /assets/gallery/1/[email protected] (allowed_dirs: Array
    (
    )
    ) in file "phpthumb.class.php" on line 1096
        [3] => resolvePath: iteration, path=/assets/gallery/1/[email protected], base path = /homepages/26/d523312972/htdocs/assets/components/gallery in file "phpthumb.class.php" on line 1115
        [4] => open_basedir: "" in file "phpthumb.class.php" on line 1082
        [5] => resolvePath: stop at component 5 in file "phpthumb.class.php" on line 1131
        [6] => resolvePath: stop at path=/assets/gallery/1/[email protected] in file "phpthumb.class.php" on line 1134
        [7] => resolvePath: no match, returning null in file "phpthumb.class.php" on line 1136
        [8] => !$this->config_allow_src_above_docroot therefore setting "" (outside "/homepages/26/d523312972/htdocs/assets/components/gallery") to null in file "phpthumb.class.php" on line 1261
        [9] => setSourceFilename() set $this->sourceFilename to "" in file "phpthumb.class.php" on line 271
        [10] => setSourceFilename(/homepages/26/d523312972/htdocs/assets/gallery/1/[email protected]) set $this->sourceFilename to "/homepages/26/d523312972/htdocs/assets/gallery/1/[email protected]" in file "phpthumb.class.php" on line 271
        [11] => CleanUpCacheDirectory() set to purge (NULL days; NULL MB; NULL files) in file "phpthumb.class.php" on line 667
        [12] => CleanUpCacheDirectory() skipped because "/homepages/26/d523312972/htdocs/assets/components/gallery/cache//phpThumbCacheStats.txt" is recently modified in file "phpthumb.class.php" on line 677
        [13] => Addding ImageMagick formats to $AvailableImageOutputFormats (text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 919
        [14] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 925
        [15] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 936
        [16] => $this->thumbnailFormat set to $this->f "jpeg" in file "phpthumb.class.php" on line 943
        [17] => $this->thumbnailQuality set to "90" in file "phpthumb.class.php" on line 953
        [18] => ResolveFilenameToAbsolute() NOT prepending $this->config_document_root (/homepages/26/d523312972/htdocs/) to $filename (/homepages/26/d523312972/htdocs/assets/gallery/1/[email protected]) resulting in ($AbsoluteFilename = "/homepages/26/d523312972/htdocs/assets/gallery/1/[email protected]") in file "phpthumb.class.php" on line 1216
        [19] => resolvePath: /homepages/26/d523312972/htdocs/assets/gallery/1/[email protected] (allowed_dirs: Array
    (
    )
    ) in file "phpthumb.class.php" on line 1096
        [20] => resolvePath: iteration, path=/homepages/26/d523312972/htdocs/assets/gallery/1/[email protected], base path = /homepages/26/d523312972/htdocs in file "phpthumb.class.php" on line 1115
        [21] => resolvePath: stop at component 9 in file "phpthumb.class.php" on line 1131
        [22] => resolvePath: stop at path=/homepages/26/d523312972/htdocs/assets/gallery/1/[email protected] in file "phpthumb.class.php" on line 1134
        [23] => resolvePath: path parsed, over in file "phpthumb.class.php" on line 1140
        [24] => $this->sourceFilename set to "/homepages/26/d523312972/htdocs/assets/gallery/1/[email protected]" in file "phpthumb.class.php" on line 849
        [25] => phpThumb() v1.7.13-201406261000
    http://phpthumb.sourceforge.net
    
    Error messages disabled.
    
    edit phpThumb.config.php and (temporarily) set
    $PHPTHUMB_CONFIG['disable_debug'] = false;
    to view the details of this error in file "phpthumb.class.php" on line 4050
        [26] => SetCacheFilename() _src set from md5($this->sourceFilename) "/homepages/26/d523312972/htdocs/assets/gallery/1/[email protected]" = "cb1addc8a712fdc9171af4be5bcad232" in file "phpthumb.class.php" on line 3443
        [27] => SetCacheFilename() _par set from md5(_farC_zc1_h188_w300_dpi150_q90) in file "phpthumb.class.php" on line 3476
        [28] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 3236
        [29] => GetImageSize(/homepages/26/d523312972/htdocs/assets/gallery/1/[email protected]) says image is x in file "phpthumb.class.php" on line 3246
        [30] => GetImageSize("/homepages/26/d523312972/htdocs/assets/gallery/1/[email protected]") failed in file "phpthumb.class.php" on line 3279
        [31] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1508
        [32] => phpThumb_tempnam() returning "/homepages/26/d523312972/htdocs/assets/components/gallery/pThumbsj9y4s" in file "phpthumb.class.php" on line 4275
        [33] => ImageMagickSwitchAvailable(thumbnail) = 1 in file "phpthumb.class.php" on line 1445
        [34] => ImageMagickSwitchAvailable(density) = 1 in file "phpthumb.class.php" on line 1445
        [35] => GetImageSize(/homepages/26/d523312972/htdocs/assets/gallery/1/[email protected]) FAILED with error "" in file "phpthumb.class.php" on line 1602
        [36] => GetImageSize(/homepages/26/d523312972/htdocs/assets/gallery/1/[email protected]) failed in file "phpthumb.class.php" on line 1749
        [37] => Remaining $this->fltr after ImageMagick: (array(0) { } ) in file "phpthumb.class.php" on line 2132
        [38] => ImageMagickSwitchAvailable(quality;interlace) = 1 in file "phpthumb.class.php" on line 1442
        [39] => ImageMagick called as (convert -density '150' -thumbnail '300x188' -quality '90' -interlace line  '/homepages/26/d523312972/htdocs/assets/gallery/1/[email protected][0]' jpeg:'/homepages/26/d523312972/htdocs/assets/components/gallery/pThumbsj9y4s' 2>&1) in file "phpthumb.class.php" on line 2151
        [40] => ImageMagick failed with message (convert: unable to open image `/homepages/26/d523312972/htdocs/assets/gallery/1/[email protected]':  @ error/blob.c/OpenBlob/2489.
    convert: missing an image filename `jpeg:/homepages/26/d523312972/htdocs/assets/components/gallery/pThumbsj9y4s' @ error/convert.c/ConvertImageCommand/2940.) in file "phpthumb.class.php" on line 2156
        [41] => deleting "/homepages/26/d523312972/htdocs/assets/components/gallery/pThumbsj9y4s" in file "phpthumb.class.php" on line 2188
        [42] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3286
        [43] => SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 3215
        [44] => SetOrientationDependantWidthHeight() setting w="300", h="188" in file "phpthumb.class.php" on line 3231
        [45] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 3343
        [46] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3603
        [47] => starting ImageCreateFromFilename(/homepages/26/d523312972/htdocs/assets/gallery/1/[email protected]) in file "phpthumb.class.php" on line 3518
        [48] => empty $filename or GetImageSize(/homepages/26/d523312972/htdocs/assets/gallery/1/[email protected]) failed in file "phpthumb.class.php" on line 3567
        [49] => Populating $rawimagedata in file "phpthumb.class.php" on line 3575
        [50] => cannot fopen(/homepages/26/d523312972/htdocs/assets/gallery/1/[email protected]) in file "phpthumb.class.php" on line 3586
        [51] => Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3674
        [52] => $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3726
        [53] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3728
        [54] => phpThumb() v1.7.13-201406261000
    http://phpthumb.sourceforge.net
    
    Error messages disabled.
    
    edit phpThumb.config.php and (temporarily) set
    $PHPTHUMB_CONFIG['disable_debug'] = false;
    to view the details of this error in file "phpthumb.class.php" on line 4050
        [55] => SourceImageToGD() failed in file "phpthumb.class.php" on line 351
    )
    

    This question has been answered by dubbs. See the first response.

    [ed. note: dubbs last edited this post 11 years, 6 months ago.]
      • 8168
      • 1,118 Posts
      Looking at error log, I think this error is linked to the use of Retina JS on this site - seems this person had the same issue > https://forums.modx.com/thread/86659/retina-js-and-phpthumb-add-2x - retina.js seems to be the issue I think?
      • discuss.answer
        • 8168
        • 1,118 Posts
        I can confirm - make sure you are running v1.3.0 or later of retina.js - then add "data-no-retina" to your Gallery Thumb chunk and this should solve this bug...