We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31902
    • 342 Posts
    Hello, all... this one has me stumped and I've been at it for days trying to figure out the issue.

    On a previous site, done with MODx Revo 2.1.3, I had created an image gallery which worked great. It utilized the Gallery component for image management in the control panel and I had it using Thickbox ( http://jquery.com/demo/thickbox/ ) to pop up images on the front end. As a result, I've created a similar gallery on another site that uses Revo 2.2.1. I used the same exact code as that original site (which I'll show below).

    The problem is that, although the large (full-size) gallery images are popping up fine in the front end, and the Thickbox effect is working okay when doing so, the thumbnail images are not appearing on the front end of the site or in the control panel, within the Gallery component. I have verified that:

    1. The new 2.2.1 version site has 'Prepend Site URL to Thumbs' set to 'Yes'.
    2. The new 2.2.1 version site has 'Timezone' set to 'America/New_York' which I'm told is correct.
    3. Noted both sites have a tilde in the URL, so that is probably not the issue.
    4. Both sites have user friendly URLs turned on. Tried unsuccessfully with it off, too.
    5. ImageMagick is installed on the server containing the new, 2.2.1 version.
    6. Gallery version is 1.5.0.
    7. When I look at the system settings of both Revo versions and search on the word "gallery", the results do show some differences. For instance, compared with the old version, the new version adds these, although I don't know if these have anything to do with my problem:
     
         gallery.files_path, which is set to [[++assets_path]]gallery/
         gallery.files_url, which is set to [[++assets_url]]gallery/
         Extension Packages, which is set to [{"gallery":{"path":"[[++core_path]]components/gallery/model/"}}]
    


    The gallery on the site that is working (version 2.1.3) can be viewed here: http://67.222.24.164/~hawkresort/weddings-image-gallery.html

    The problem gallery (on version 2.2.1) can be viewed on this page: http://108.160.154.121/~vtroofing/gallery.html.

    When I look at the source code of both sites, the resulting source code is similar in each thumbnail, except that:

    1. The new site's thumbnails have a div class of "gal-item-active"
    2. The old working site's thumbnails have a div class of "gal-item"

    Not sure if that has anything to do with the issue, but it was a difference that I had noted.

    The way I built the thing on both old and new Revo versions is as follows:

    1. Installed Gallery on the site.
    2. The galItemThumb chunk contains this:


    <div class="[[+cls]]">
        <a href="[[+image_absolute]]" title="[[+name]]" rel="gallery" class="thickbox">
    
    <img class="[[+imgCls]]" src="[[+thumbnail]]" alt="[[+description]]" />
        </a>
    </div>
    



    ...note that using the original galItemThumb code that came with Gallery resulted in the same problem, so this is probably not the source of the issue.

    3. The galAlbumRowTpl (which I don't think plays a part with this gallery solution) stays the same with this:

    <li[[+cls:notempty=` class="[[+cls]]"`]]><a href="[[~[[*id]]? &[[+albumRequestVar]]=`[[+id]]`]]">[[+showName:notempty=`[[+name]]`]]</a></li>
    


    4. The Gallery call looks like this:

    [[!Gallery? &album=`1` &thumbTpl=`galItemThumb` &rowTpl=`galAlbumRowTpl`]]
    


    Again, not sure if the galAlbumRowTpl even plays a part in this gallery solution, but I left it in just to go along for the ride...it has no effect whether it is included or not.

    5. Images were uploaded to the server (directories are writable) by way of the Gallery component in the control panel.

    So....

    Is there anything about Revo 2.2.1 you can think of that needs to be set to get the thumbnails to show in both the front end of the site, as well as the Gallery component of the control panel?

    Thank you in advance.

    ///////////////////////////////////////

    The new Revo 2.2.1 version site runs on PHP Version 5.2.17
    The old Revo 2.1.3 version site runs on PHP Version 5.2.10 [ed. note: waizen last edited this post 14 years, 6 months ago.]
      • 39470
      • 3 Posts
      I guess the problem is somewhere between connector and phpthumb. I have same kind of problem; pics not showing at all, no matter what. Anyway, this seems to be a bug.. the code is very difficult to follow, so nocando ..at least i gotta wait for fix smiley

      If you can handle the code better, you might want to check where the path is generated. Seems like its having two times the core_path (mysite.com/something/assets/something/assets//gallery/1/1.jpg)

      Post the fix if you are able to find one.
        • 16348
        • 64 Posts
        Are there any errors in the error log?
          • 31902
          • 342 Posts
          Not much to go on, but here is where I am with this so far... maybe it's something of a clue:

          As a test, I took the exact code, as mentioned above, from the problem site and set up a gallery on a different site on a server that has always worked for me; a MODx 2.2.1 site. Sure enough, it worked. So, my code is okay.

          Next, I took a site that has a gallery that works and currently lives on the above mentioned server that always works, and moved it over to the server that the problem site is built on. Not sure if it matters but this test site was originally built with MODx 2.1.3.

          The gallery on the test site failed to work.

          Soooooooo...

          It seems to be server configuration related, at least in my case. We are currently having the host recompile the server to meet the MODx requirements, as listed on this page:

          http://develop.modx.com/develop/revolution/requirements


          We'll see if that works. [ed. note: waizen last edited this post 14 years, 6 months ago.]
            • 31902
            • 342 Posts
            Kristoffer: No, nothing regarding that in the error log.
              • 18373 ☆ A M B ☆
              • 3,141 Posts
              Is GD installed in addition to IM?

              As it seems to be using the full URL in the connector request, try setting the phpthumb_allow_src_above_docroot setting to yes, it may be failing on that as it is prepending the site_url.

              Also, it seems to throw an internal server error (500) on the thumbnails, so there should be more information in your servers' error log (or an error_log file probably located in the directory the connector.php file is located at).
                Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                • 31902
                • 342 Posts
                Thank, Mark:

                Yes, it is set to 'yes' already.

                We've taken to moving that site, as is, to another server that is known to work for our MODx sites and the gallery worked without a problem.

                So, it seems to be server related somehow. Unfortunately, the mystery is still there because we had asked the host to configure the server for us according to the requirements on this page:

                http://develop.modx.com/develop/revolution/requirements


                So, unless the requirements page is missing something (I doubt that since the MODx community would have spotted that, already, I'm sure), or, more likely, our host didn't do everything they were supposed to.

                We're going to have them rebuild the server completely as a result and if that doesn't work, well... on to the next host.