We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1778
    • 659 Posts
    After 2 days searching and testing ( (https://forums.modx.com/thread/74777/gallery-1-4-image-corrupt-or-truncated#dis-post-414696 and https://forums.modx.com/thread/74768/gallery-album-well-created-but-no-image-shown-in-manager#dis-post-414665) I finally found a solution ! :

    To avoid any conflict I've done
    Fresh new install of Revo from git (develop)
    Don't modifiy any settings
    Just install Gallery in its latest version (1.4-rc1)
    => same problems as I explain yesterday

    HOW I SOLVED IT
    (I had another revo install with Gallery 1.2), I had replace the actual gallery/processors/web/phpthumb.php by the phpthumb.php from the Gallery 1.2 version, and now it works fine (I can see my thumbnails in manager, and images in front-end as expected)

    I suppose there's something wrong in the phpthumb.php provided with Gallery 1.4.0-rc1 (the 2 files are very different !)

    I guess this is not the best way to solve the problem, but at the moment it's the only way I find to have Gallery working ....

    Hope this can helps those who are in the same trouble as me....And give some useful insights to debug the next release ^_^
    Cheers

      • 1778
      • 659 Posts
      It works but more or less....
      I created a galleryitemTV, but still have notice if I leave it blank.
      If I put 2 galleryItemTV in the same template and create a doc, I have to save after the first one, then clear the cache, then re-edit my resource fill the 2nd TV and save again...
      Not reallly acceptable for a client...
      Hope there will be a solution soon (maybe just a problem of config my side but I can't find what or where, I tried every thing I thought with no success)... There's a problem with phpthumb that seems to corrupt files... But no error in error log, only in the Apache log (stack)..
      I desperate...
      Cheers
        • 1778
        • 659 Posts
        Some hours later... No solution but maybe a clue...
        As Gallery 1.4 now loads class modPhpThumb, and the previous version load class galphpthumb.class (provided with Gallery 1.2.2) I decided to compare the two files that are pretty similar. the only notable difference is between the line 87 in galphpthumb.class and line 73 in modPhpThumb.class

        In the galphpthumb.class (which works and displays well the thumbs as explained before) we have line 87
        public function set($src) {
                $src = str_replace('+','%27',urldecode($this->modx->getOption('src',$this->config,'')));
                if (empty($src)) return '';
                return $this->setSourceFilename($src);
            }
        


        In modPhpThumb.class these lines become (line 73)
        public function set($src) {
                $src = rawurldecode($src);
                if (empty($src)) return '';
                return $this->setSourceFilename($src);
            }
        


        Is the rawurldecode() can be the source of the issue i'm facing ?

        Any help would be much appreciated
        Cheers [ed. note: anso last edited this post 14 years, 6 months ago.]