Images exist in the correct /assets/gallery/ folder.
File permissions are correct and thumbnails for other parts of the site work fine.
Direct calls to the Gallery connector like this generate thumbnails correctly:
Error log:
[2025-06-28 07:45:15] (ERROR @ /var/www/clients/client1/web1/web/core/components/gallery/processors/web/phpthumb.class.php : 181) [phpThumbOf] Could not generate thumbnail: /var/www/clients/client1/web1/web/ - Debug: Array
(
[0] => phpThumb() v1.7.22-202312071641 in file “phpthumb.class.php” on line 279
[1] => setSourceFilename(/var/www/clients/client1/web1/web/) set $this->sourceFilename to “/var/www/clients/client1/web1/web/” in file “phpthumb.class.php” on line 347
[2] => CleanUpCacheDirectory() set to purge (NULL days; NULL MB; NULL files) in file “phpthumb.class.php” on line 806
[3] => CleanUpCacheDirectory() skipped because “/var/www/clients/client1/web1/web/assets/components/gallery/cache//phpThumbCacheStats.txt” is recently modified in file “phpthumb.class.php” on line 816
[4] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;avif;webp;png;jpeg) in file “phpthumb.class.php” on line 1071
[5] => $this->thumbnailFormat set to $this->config_output_format “jpeg” in file “phpthumb.class.php” on line 1083
[6] => $this->thumbnailFormat set to $this->f “jpeg” in file “phpthumb.class.php” on line 1090
[7] => $this->thumbnailQuality set to “75” in file “phpthumb.class.php” on line 1100
[8] => resolvePath: /var/www/clients/client1/web1/web/ (allowed_dirs: Array
(
)
) in file “phpthumb.class.php” on line 1243
[9] => resolvePath: iteration, path=/var/www/clients/client1/web1/web/, base path = /var/www/clients/client1/web1/web in file “phpthumb.class.php” on line 1262
[10] => open_basedir: “/var/www/clients/client1/web1/web:/var/www/clients/client1/web1/private:/var/www/clients/client1/web1/tmp:/var/www/boltonfm.com/web:/srv/www/boltonfm.com/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom” in file “phpthumb.class.php” on line 1229
[11] => resolvePath: stop at component 8 in file “phpthumb.class.php” on line 1278
[12] => resolvePath: stop at path=/var/www/clients/client1/web1/web in file “phpthumb.class.php” on line 1281
[13] => resolvePath: path parsed, over in file “phpthumb.class.php” on line 1287
[14] => $this->sourceFilename set to “/var/www/clients/client1/web1/web” in file “phpthumb.class.php” on line 988
[15] => phpThumb() v1.7.22-202312071641
Error messages disabled.
Am I doing something wrong?
I assume I can ignore the open base dir error - never did figure that one out, but it’s doesn’t stop phpThumb working elsewhere on the site.
Don’t know how long it’s been like that, to be honest don’t use it very often, browsing with the actually galley plugin works fine.
Does this issue only happen if you use a certain media source?
Or asked differently, if you open “Media” → “Media Browser” (in the top menu) and navigate to the assets/gallery/ folder in the default “Filesystem” Media Source, do the thumbnails show then?
That does work, images are shown correctly. Completely different load method appears to be used. No double &
I have changed the auth element - assuming that could be security sensitive.
/connectors/system/phpthumb.php?src=assets%2Fgallery%2F16%2F389.jpg&w=100&h=0&HTTP_MODAUTH=********************************************&f=png&q=90&wctx=mgr&source=1&t=1643532497
The Gallery extra comes with a custom media-source type.
Can you confirm that this custom media-source type (= “Gallery Albums”) is used (for the media-source with the broken thumbnails)?
To verify, go to “Media” → “Media Sources” in the top-menu → right-click the media-source in question → select “Update Media Source” → check if the value of the “Source Type:” dropdown is “Gallery Albums”).
The system setting xhtml_urls is a setting of the MODX core (and not a setting of the Gallery extra) and the default value is Yes. So changing this setting might affect other code on your site, especially when URLs are generated.
It think the cause of the issue is, that (like 5 years ago) the Javascript code of the MODX media browser got changed, to encode HTML in the URLs (for security reasons). Because the media-source of the Gallery extra already encodes the & in URLs on the server (in PHP), it’s now encoded twice.
I guess, the code in the Gallery extra has to be changed to account for this.
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.