Gallery not loading

Created on 28 January 2025, about 1 month ago

Problem/Motivation

Installed module and library. No errors on the status report page. It shows the library listed: Juicebox Javascript Library
Lite 1.5.1

Went to the Manage Display page for our featured media paragraph type. Changed the format to Image with Dimensions and set it to Juicebox medium.

Sizes of images on those nodes changes to match the medium style. However, no image gallery shows. Just a long list of images.

Steps to reproduce

Visit: https://celestine10.nl-sandbox.xyz/node/43

You'll see the long list of images and no image gallery.

πŸ’¬ Support request
Status

Active

Version

4.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States jsimonis

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jsimonis
  • πŸ‡ΊπŸ‡ΈUnited States fkelly

    Do you have the gallery embedded in a content type following instructions on the project page? For instance, on my sites I have created a Juicebox gallery content type. Here is what's in the view source of one of those content type items:

    <script src="/web/sites/all/libraries/juicebox/juicebox.js"></script><script>
        new juicebox({
            baseUrl : '/web/sites/default/files/jboxgalleries/greylock10/',
            containerId: 'juicebox-container',
            galleryWidth: '100%',
            galleryHeight: '110%',
            backgroundColor: '#222222'
        });
        </script>
    <div id="juicebox-container">
        &nbsp;
    </div>

    When I click on the url for that content type item (preferably from a menu) it will find a greylock10 xml file that is in the location in the baseUrl and run it through the juicebox.js program that's in the first line of the code I listed. There has to be a connection (association) between the juicebox.js file and the xml file for the gallery to "work". Otherwise you just have a list of images ... which is what it appears that you have now.

  • πŸ‡ΊπŸ‡ΈUnited States jsimonis

    I'm using it as a field formatter ("Basic Field-Based Galleries (the Field Formatter" from the documentation page).

    The paragraph field has it set on the "Manage Display" page (screenshot attached).

  • πŸ‡ΊπŸ‡ΈUnited States fkelly

    Thanks for the clarification. I had not used the field formatter previously so I used a spare content type named Experiment on my "live" web page where I have many uploaded galleries. I read through and followed the documentation that Rjacobs provided oh so many years ago ... located at

    β†’

    The result you can see at:

    https://fkelly.org/web/node/267

    I have 4.0.0-alpha2 of the Juicebox module loaded.

    The content type, which I named Experiment has one field named Image field for gallery (sorry for my lack of imagination) and allows for an unlimited number of values ... alt field enabled. The documentation page kind of recommends using media items but I haven't used many of those and have many "normal" image files lying around that are not media items.

    Sorry for formatting issues in this post, don't have time to be capturing png. files for display here.

    Field	                                     Label	                                                              Format
    image field for gallery                     Above                                                            Image style: Juicebox medium (1024x1024)
                                                                                                                                       Thumbnail style: Juicebox small (800x800)
                                                                                                                                        Caption source: File - Filename (processed by fallback text format)
                                                                                                                                        Title source: Image - Alt text (processed by fallback text format)
                                                                                                                                         Additional Juicebox library configuration options may also be set.
    
    

    Having done that the Juicebox gallery seems to work as shown in the link at the top of this post.

  • πŸ‡ΊπŸ‡ΈUnited States jsimonis

    Yup, mine is a media field with several images in it.

    I wonder if it has something to do with it being in a paragraph that is then added to a content type. I've never had issues with it like this before. Normally, the field formatter is super simple.

  • πŸ‡ΊπŸ‡ΈUnited States fkelly

    Sorry about the formatting issues with my post. Maybe try adding the images without them being in a paragraph. This was my first effort at using the field formatter and it worked pretty much right away. I can see that you have the "raw" images on your page: maybe try just adding them as "instances" of image fields (i.e., setting allowed number of values to unlimited) and see if that works.

  • πŸ‡ΊπŸ‡ΈUnited States jsimonis

    Yea, it's a media (image) field right now with unlimited images. The formatter is definitely affecting them, as they change sizes depending on what I put as the options for the slideshow. It's just not using the slideshow.

    I'll have to try it as a field in the content. But that won't work for some of these others where we need the paragraphs.

  • πŸ‡ΊπŸ‡ΈUnited States jsimonis

    Okay, added a media field straight to the content type instead of via the paragraph. Re-added the photos. Set the format on the manage display page to be the slideshow. Still getting the same thing.

    I uploaded new screenshots.

    Here's the one I made the changes to: https://celestine10.nl-sandbox.xyz/node/77

  • πŸ‡ΊπŸ‡ΈUnited States fkelly

    Thanks for the update @jsimonis.

    To start at the end: here is a link to a gallery based on media images that I created on my live site.

    https://fkelly.org/web/node/266

    It's a real Juicebox gallery with all gallery features.

    Next, here is there is a png file for the content type setup showing the manage fields screen. Then a png for manage display and finally a png for the screen where I add the images to the content type (capture.png). The link (above) shows how the completed gallery is presented on the web page. In manage display I have tried with image style set to Juicebox Pro but also just plain Juicebox Gallery. Both work okay.

    I don't think that having the Juicebox Library set to Lite 1.5.1 should have any way to affect this but I don't have any way to test that.

  • πŸ‡ΊπŸ‡ΈUnited States fkelly

    Puzzled, so rereading your initial post. It says "Went to the Manage Display page for our featured media paragraph type. Changed the format to Image with Dimensions and set it to Juicebox medium."

    I don't see an option in format for Image with Dimensions. I believe that the format would need to be one of the Juicebox Gallery formats. Sure enough if I set the format to "original image" I no longer get a Juicebox gallery (only one of the images is shown with no thumbnails). If I go back into Manage Display and reset the format to juicebox gallery, I get a juicebox gallery again (with thumbnails shown and clickable).

    Maybe give that a try. ?

  • πŸ‡ΊπŸ‡ΈUnited States jsimonis

    There was no option for Juicebox unless I chose "Image with Dimensions." That's the only time it showed up.

    I'm not working on the site anymore, so I'm just going to say this can be closed.

  • πŸ‡ΊπŸ‡ΈUnited States fkelly

    I will close this at your request. I can see that your "other" sites have many images and galleries working.

    As a side note: since your sites seem to be "commercial" in nature, you might want to spring for the Juicebox Pro option if you intend to revisit this.

  • πŸ‡ΊπŸ‡ΈUnited States jsimonis

    Yeah, it was crazy because I have a ton of them on my personal site about gardening.

    I won't be working on the site again, so I won't need to revisit that one. But I may get the pro one at some point for my personal sites. It would be nice to have more control over the size.

Production build 0.71.5 2024