0

I'm using Gallery Formatter module in a node type. My problem is that just in some nodes the module seems not to work. The images are loaded, when you click on a thumbnail the main image changes, but the infinite carroussel is not applied to the thumbnail images and the direction arrows are not generated (images below).

This is how the gallery should look like: proper gallery This is how the gallery looks like (just in some nodes): bugged gallery

I inspected the elements to see the differents and looks like the carroussel styles are not applied.

The propper structure is:

<div class="gallery-thumbs" style="width: 848px;">
    <div class="wrapper" style="overflow: hidden;">
      <ul style="width: 99999px;">
        <li class="slide-0 cloned" style="width: 100px;">...</li>
        <li class="slide-1 cloned" style="width: 100px;">...</li>
        <li class="slide-2 cloned" style="width: 100px;">...</li>
        <li class="empty cloned" style="width: 100px;"></li>
        <li class="empty cloned" style="width: 100px;"></li>
         ...
      </ul>
    </div>
</div>

And the defectuous structure is:

<div class="gallery-thumbs" style="width: 848px;">
    <div class="wrapper">
      <ul>
        <li class="slide-0 cloned" style="width: 100px;">...</li>
        <li class="slide-1 cloned" style="width: 100px;">...</li>
        <li class="slide-2 cloned" style="width: 100px;">...</li>
         ...
      </ul>
    </div>
</div>

I've checked the font code and the js and css of the module are properly loaded in both nodes:

@import url("http://mysite.example/sites/all/modules/galleryformatter/gallerystyles/greenarrows/greenarrows.css?o5448l");
@import url("http://mysite.example/sites/all/modules/galleryformatter/theme/galleryformatter.css?o5448l");
<script type="text/javascript" src="http://mysite.example/sites/all/modules/galleryformatter/theme/infiniteCarousel.js?o5448l"></script>
<script type="text/javascript" src="http://mysite.example/sites/all/modules/galleryformatter/theme/galleryformatter.js?o5448l"></script>
 ...

I can't find the difference that makes the gallery work in one node and not the other one. They are nodes of the same type, generated the same way, they have no significant differences. If i inspect the js It looks like there is an image returning a 403 error:

http://mysite.example/sites/default/files/styles/thumbnail/public/85114_10.jpg/p/itok/TeF8kbN Failed to load resource: the server responded with a status of 403 (Forbidden)

Which seems to be the root of the problem since I've found the same error for some thumbnail in the few cases where the gallery seems not to work.

I'm not suere what causes this 403 error, may be a problem with image styles? Is it possible to avoid the Gallery Formatter crash when this happens?

  • I am not sure about my answer, but the image URL should be like mysite.example/sites/default/files/styles/thumbnail/public/…, please do check url should be like ?itok=asdfas, but in your case it is .jpg/p/itok/TeF8kbN – NTT Apr 4 '16 at 15:46
  • In the url that appears in the 403 error message you can see that there is a token: "sites/default/files/styles/thumbnail/public/85114_10.jpg/p/itok/TeF8kbN" . I can avoid the error allowing insecure derivatives as explained here: drupal.stackexchange.com/questions/63226/… but It's just a workaround that doesn't solve the problem. Why some images are not loaded properly while almost all of them do? – Miquel Correa Casablanca Apr 5 '16 at 6:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.