We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46332
    • 17 Posts
    In order to bin down the problem affecting my gallery (see http://forums.modx.com/thread/89148/gallery-1-5-3-pl-template-variables-and-filter-option#dis-post-495101), I decided to start over a new installation and check what could be different.

    I performed the following actions:

    1. I created a new directory within the document root of my Apache server (ZZZ)
    2. redownloaded MODX 2.2.14-pl
    3. I unzipped modx archive file
    4. I started modx installation procedure, let all values as the default value proposed.
    5. I logged in to MODX
    6. I installed Gallery 1.6.2-pl.
    7. I created one album.
    8. I added one picture to the album.

    Same problem. The picture is uploaded and I can see it from the filemanager (left part of MODX admin), however, the picture is not displayed from Gallery dedicated screens.

    If I check the error log, I see that phpThumbs fails once again on the same kind of problem : not able to find the file :
    It looks for : /var/www/StarWay/html/ZZZ/modx-2.2.14-pl/ZZZ///ZZZ//assets/gallery/1/1.jpg
    instead of /var/www/StarWay/html/ZZZ/modx-2.2.14-pl/manager/assets/gallery/1/1.jpg

    Anyone manages to have the Gallery component 1.6.2 working? What are the required basic steps for installing Gallery 1.6.2?
      • 45034
      • 8 Posts
      Check out your /public_html/config.core.php file. Make sure you are pointing to the correct folder. This worked for me.
      • Indeed. Just to see if there was a problem, I simply installed Gallery using Package Manager, created a new gallery named My Gallery, and uploaded an image into it. I didn't even bother to check the size or filename of the image, just grabbed the first one I saw in the directory to upload from.

        Then I created a resource with the simplest Gallery snippet [[!Gallery? &album=`My Album`]] and it immediately worked, right out of the box. Here's the URL to the image
                <img class="" src="/revo2214/assets/components/gallery/connector.php?action=web/phpthumb&ctx=web&w=100&h=100&zc=1&far=C&q=90&src=%2Frevo2214%2F%2Frevo2214%2Fassets%2Fgallery%2F1%2F1.jpg" alt="Beatrice"  />


        I did not modify any of the default Gallery installation settings. The MODX installation is a 2.2.14 that I use for tests like this, but nothing in the way of paths or URLs has been changed, other than turning on Friendly URLs. [ed. note: sottwell last edited this post 9 years, 11 months ago.]
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 46332
          • 17 Posts
          Quote from: too2tuff at May 07, 2014, 04:01 AM
          Check out your /public_html/config.core.php file. Make sure you are pointing to the correct folder. This worked for me.

          Thanks for the idea. My config.core.php contains :

          <?php
          define('MODX_CORE_PATH', '/var/www/StarWay/html/ZZZ/modx-2.2.14-pl/core/');
          define('MODX_CONFIG_KEY', 'config');
          ?>
          


          So I guess it is correct since MODx is installed in /var/www/StarWay/html/ZZZ/modx-2.2.14-pl.
            • 46332
            • 17 Posts
            Quote from: sottwell at May 07, 2014, 05:09 AM
            Then I created a resource with the simplest Gallery snippet [[!Gallery? &album=`My Album`]] and it immediately worked, right out of the box. Here's the URL to the image
            ...
            I did not modify any of the default Gallery installation settings. The MODX installation is a 2.2.14 that I use for tests like this, but nothing in the way of paths or URLs has been changed, other than turning on Friendly URLs.

            Thanks,

            I tested the same thing : using the album I created into a snipped (the URL error I posted in the first message was from the gallery manager, not the ressource page).

            When I consult my ressource with the gallery album, I also get an URL error :

            http://www.starway.org/ZZZ/modx-2.2.14-pl/assets/components/gallery/connector.php?action=web/phpthumb&ctx=web&w=100&h=100&zc=1&far=C&q=90&src=%2FZZZ%2Fmodx-2.2.14-pl%2F%2FZZZ%2Fmodx-2.2.14-pl%2Fassets%2Fgallery%2F1%2F1.jpg
            


            As you can see, the encoded URL is : %2FZZZ%2Fmodx-2.2.14-pl%2F%2FZZZ%2Fmodx-2.2.14-pl%2Fassets%2Fgallery%2F1%2F1.jpg instead of %2FZZZ%2Fmodx-2.2.14-pl%2Fassets%2Fgallery%2F1%2F1.jpg, there is one %2FZZZ%2Fmodx-2.2.14-pl%2F too much.
            • Sorry, I have no clue. Phpthumb has been a black-box to me for years. Sometimes it works, sometimes it doesn't.
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org