We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46332
    • 17 Posts
    I managed to have Gallery 1.5.2-pl working fine for me, and yesterday, I chose to update to Gallery 1.5.3-pl with a reinstallation of the add-on (I had to play with a lot of settings previously to get 1.5.2 working).

    I got Gallery 1.5.3-pl working after setting :

    • phpthumb_document_root
    • gallery.thumbs_prepend_site_url = yes

    Galleries, and GalleryItems work fine, I can manage them and display them normally. However, I can not get my Template Variable work as it used to be. I can select (and see) pictures for the TV in the dedicated window, but pictures are not correctly displayed in the TV screen nor where used in the content.

    Sample generated URLs:

    In both cases, phpThumb returns a default error image, without any trace in the error log file.

    If I modify the URLs for the TV by removing the fltr part, I get an image being returned.

    Any idea what is going wrong here?
      • 38290
      • 712 Posts
      What is the default error you see? What version of MODX? Sounds like a phpthumb issue. Very little changed in Gallery 1.5.3, was just a hotfix to address a sessions issue
      https://github.com/modxcms/Gallery/commit/ee31091a295aadf0d6b393be55b17cc36fe5a23d
        jpdevries
        • 46332
        • 17 Posts
        I use MODX Revolution 2.2.11-pl, everything is up to date. I have not modified the content of my GalleryItems TVs after I upgraded from 2.2.10 to 2.2.11. Maybe the problem was introducted at this moment.

        Regarding the error, here is a cropped down version of the resulting picture.
          • 38290
          • 712 Posts
          It is possible that it is a 2.2.11 issue. There is a 2.2.12 dev release for testing that may fix this issue:
          https://github.com/modxcms/revolution/commit/545b148a5eaae667572dc93b812968a69d458d33
          https://twitter.com/drumshaman/status/434370610806812673

          Been in testing for a few days, so the public release should be out soon.
            jpdevries
            • 46332
            • 17 Posts
            Thanks for the update.

            I'll be waiting for 2.2.12-pl and keep you posted !
              • 46332
              • 17 Posts
              I just installed 2.2.12-pl and checked. The problem is still there :

              • Once a galleryitem selected for the TV, the the picture displayed in the TV section shows the error.
              • If I do not crop nor watermark the picture, it is corretly displayed on the website.
              • If I crop the picture, it shows once again the same error message on the web site.

              All in all the problem is related to the "&fltr[]=..." option added to the URI of the picture. Without it, it works like a charm.
                • 46332
                • 17 Posts
                Since a new release of Gallery (1.6.1) was available, I just updated in case it fixed the problem. It turned it did not fix the TV problem, worse : nothing now works any more : all gallery related picture (TV selection screen, Gallery management screen, Content pages) are now "broken" image files.

                If I look at the URL generated for one picture (on the generated website) I see : http://www.starway.org/test/modx/assets/components/gallery/connector.php?action=web/phpthumb&ctx=web&w=1600&h=1206&f=png&src=%2Ftest%2Fmodx%2F%2Ftest%2Fmodx%2Fassets%2Fgallery%2F2%2F31.jpg

                Then, if I look at the error message generated into MODX :
                [3] => ResolveFilenameToAbsolute() prepending $this->config_document_root (/var/www/StarWay/apps/MODx_Test) to $filename (/test/modx//test/modx/assets/gallery/2/31.jpg) resulting in ($AbsoluteFilename = "/var/www/StarWay/apps/MODx_Test/test/modx//test/modx/assets/gallery/2/31.jpg") in file "modphpthumb.class.php" on line 262


                It turns out that :

                • The URL of the image is incorrect in the first place. The src parameters contains twice the virtual root of my website.
                • When phpthumb processes the order, we get an absolute path for the picture also incorrect : root path of the web directory (correct) + virtual root (incorrect) + virtual root (incorrect) + assets/gallery/... (correct)

                It seams that the new gallery generates wrong src paths for pictures.

                Is there anybody else experiencing the same kind of problem.
                  • 11366
                  • 5 Posts
                  Hello All,

                  I am also experiencing this same issue.
                  MODX Revo 2.2.13-pl | Gallery 1.6.1-pl

                  I am using a TV to choose a gallery to display in a slideshow with the output being a URI ("image_absolute"). When I look at my page source I see the base_url prepended twice.
                  "/site//site/assets/gallery/4/31.jpg"

                  The "Prepend Site URL to Thumbs" is set to "No". I have tried changing this with no effect on the output. I have also tried setting "phpthumb_document_root" with no effect on output.

                  Everything was working until I upgraded Gallery. Thanks in advanced for any help.
                    • 46332
                    • 17 Posts
                    I just checked if MODX 2.2.14 + Gallery 1.6.1 with my installation.

                    No improvement on this issue.
                      • 38787
                      • 74 Posts
                      +1

                      I can't seem to get Gallery 1.6.2 working correctly on MODX 2.2.14.

                      When I upload a single image via Upload Item, the image does not seem to upload to the file system at all, but an extra record in the table modx_gallery_albums is created each time. The name of the extra gallery is the file path of the gallery that I was uploading to:
                      assets/files/gallery/2/

                      Where 2 is the record ID of the gallery I'm trying to upload to.

                      The uploaded images do have records correctly added to the modx_gallery_items table.