We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38142
    • 91 Posts
    Think this has been mentioned before, but I couldn't find a solution. With MODX Revo 2.5.6 and 2.5.7 edits to resources often (but not always) can't be saved (just goes round and round). The error log shows numerous errors relating to phpthumb, about generating and outputting thumbnails, even though the edit might not involving changing image TVs and even though thumbnails for existing images are showing normally. The errors seem to run in pairs. Here is one:

    [2017-05-26 20:22:56] (ERROR @ /home/coniston/core/model/phpthumb/modphpthumb.class.php : 121) phpThumb was unable to generate a thumbnail for: /home/coniston/core/cache/phpthumb/www.nationalparkcottages.co.uk__srcc9560b42b00fc10611662f43f808f9a8_par0ba78bb0326502335f8683fdf331013a_dat0.jpeg
    [2017-05-26 20:22:56] (ERROR @ /home/coniston/core/model/phpthumb/modphpthumb.class.php : 133) Error outputting thumbnail:
    OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 618


    In the past a similar problem was due to mod_security. Have turned that off to check, and the problem remains.

    Have also deleted the cache on the server. No change.

    Is there a way to get back the facility to save resource edits?

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

      • 3749
      • 24,544 Posts
      One thought, if you have a TV that doesn't allow blank values and you try to save the resource with that TV blank, the save will hang. There's an error message, but you won't see it if you're on a different tab. If it's an image TV, that could also cause the phpThumb error.

      I get those same phpThumb errors occasionally, but it has never affected saving resources. Are you sure mod_security is really off? In the code, it doesn't look like that would be a fatal error.

      Do you have any plugins connected to OnDocFormSave or something similar that might have changed recently?

      Are there any image TVs with a broken image preview showing, or no preview? Having a bad path there could cause the phpThumb error.


        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
      • discuss.answer
        • 38142
        • 91 Posts
        Bob, Thank you very much for the reply. Now I think the phpthumb errors, tough numerous, are unconnected to the saving resources issue because when I try in Chrome the saving works normally. It is only in Firefox that the problem occurs. I am ashamed to say that it is the browser that is at fault, not MODX. Clearing the cache and cookies in Firefox doesn't solve the problem, but since Chrome works fine, it seems to make sense to switch to Chrome.

        Sorry for not having done all my homework before posting. And thank you again for the reply.
          • 3749
          • 24,544 Posts
          It's always worth posting when you have a problem. smiley

          Do you have any Firefox add-ons that could be causing trouble?
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 12410
            • 353 Posts
            Hey
            I'm getting tons of errors re phpthumb that create a huge error.log file. Did anyone ever find a fix?
            Thanks

            apache2, revo 257, ubuntu 16, php7, mysql5

            [2017-08-08 09:45:58] (ERROR @ /var/www/html/mydomain.com/public_html/bhr/core/cache/includes/elements/modsnippet/131.include.cache.php : 69) [migxResourceMediaPath]: docid could not be determined.
            [2017-08-08 09:46:00] (ERROR @ /var/www/html/mydomain.com/public_html/bhr/core/model/phpthumb/modphpthumb.class.php : 121) phpThumb was unable to generate a thumbnail for: /var/www/html/mydomain.com/public_html/bhr/core/cache/phpthumb/mydomain.com__src57c39d5f19ce335bbba4039ea762c9a2_parfe75230c38c1dd77cfb659e43ae25583_dat1448272174.jpeg
            [2017-08-08 09:46:00] (ERROR @ /var/www/html/mydomain.com/public_html/bhr/core/model/phpthumb/modphpthumb.class.php : 133) Error outputting thumbnail:
            OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 618
            [2017-08-08 09:46:00] (ERROR @ /var/www/html/mydomain.com/public_html/bhr/core/model/phpthumb/modphpthumb.class.php : 121) phpThumb was unable to generate a thumbnail for: /var/www/html/mydomain.com/public_html/bhr/core/cache/phpthumb/mydomain.com__srcc1f06291aee0acbfe5f4143cce65573a_parfe75230c38c1dd77cfb659e43ae25583_dat1448272556.jpeg
            [2017-08-08 09:46:00] (ERROR @ /var/www/html/mydomain.com/public_html/bhr/core/model/phpthumb/modphpthumb.class.php : 133) Error outputting thumbnail:
            OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 618
            [2017-08-08 09:46:00] (ERROR @ /var/www/html/mydomain.com/public_html/bhr/core/model/phpthumb/modphpthumb.class.php : 121) phpThumb was unable to generate a thumbnail for: /var/www/html/mydomain.com/public_html/bhr/core/cache/phpthumb/mydomain.com__src629ee8f360bf17f9d0f61ed99b636f92_parfe75230c38c1dd77cfb659e43ae25583_dat1448284996.jpeg
            [2017-08-08 09:46:00] (ERROR @ /var/www/html/mydomain.com/public_html/bhr/core/model/phpthumb/modphpthumb.class.php : 133) Error outputting thumbnail:
            OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 618
            [2017-08-08 09:48:27] (ERROR @ /var/www/html/mydomain.com/public_html/bhr/core/cache/includes/elements/modsnippet/131.include.cache.php : 69) [migxResourceMediaPath]: docid could not be determined.
            [2017-08-08 09:52:17] (ERROR @ /var/www/html/mydomain.com/public_html/bhr/core/cache/includes/elements/modsnippet/131.include.cache.php : 69) [migxResourceMediaPath]: docid could not be determined.