Page correctly displayed within Rapidweaver (preview) on PC but no more once published

I’m testing a very nice Photo Gallery javascript named ‘Nanophotosgallery

For this, as instructed by the app developper, I added to ‘Rapidweaver/Settings/Code/Head’ :

<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1">          
<!-- jQuery -->
<script src="" type="text/javascript"></script>
<!-- nanogallery2 -->
<link  href="" rel="stylesheet" type="text/css">
<script  type="text/javascript" src=""></script>

And onto my test page, I just added a HTML stack containing this code :

<div id="test"
data-nanogallery2 = '{"thumbnailHeight":150,"thumbnailWidth": 150,"itemsBaseURL":  ""}' >
<a href = ""   data-ngThumb = "" > Berlin 1 </a>
<a href = ""   data-ngThumb = "" > Berlin 2 </a>
<a href = ""   data-ngThumb = "" > Berlin 3 </a>

In Rapidweaver everthing works like a charm :grinning: and the gallery is correctly displayed, when I :

  • switch mode button from ‘edit’ to ‘preview’
  • use the ‘simulate’ button (in different devices)
  • use the ‘preview’ button (in different browsers)

But once the page is published … then the gallery is no more displayed :cry:

Any help to troubleshoot this issue ?

my test page

Thank you

Screenshots :

Preview within Rapidweaver


Preview within Rapidweaver (after a click on 1st thumbnail)


Did you do a “republish all”?

Yes, done … but no changes

Hi @efla,

You’re trying to execute JS code from a different domain in your own site. It not working might be some kind of cross site code execution prevention.

The maker also provides the files through github; you could install those on your own webserver and modify the HTML to call those JS libraries instead.

Or go the route that the maker suggests and implement the JavaScript into your own site.

If all else fails, there are a number of gallery stacks out there that do pretty much the same as this one does.


1 Like

Thank you Erwin, I followed your advice, and now have all JS librairies installed onto my own webserver.
But still same issue, looking at the browser JS console, I see this message :

7Uncaught TypeError: jQuery(...)-nanogallery2 is not a function
at HTMLDocument.e (jquery_. nanogallery2.core. min. js:53:20281)
e @ jquery. nanogallery2. core. min. js:53

So for any reason, this script fails to load … when going live on my webserver.

But within Rapidweaver, for instance in Preview Mode (local Browser) everthing’s fine

Looking at the developer site for such message,nanogallery2 is not a function he says that “jquery is to be included one”, so meaning if I understand well that perhaps jquery has already be loaded, by Stacks or by Foundry ? and then this conflict


Finally, I’ve found my way :grinning: I’ll explain tomorrow in details how I’ve fixed this


Hi @efla,

I’m looking forward to your fix!

Fwiw: JQuery is indeed integrated locally by Stacks.



First at all I removed everything from Rapidweaver/Settings/Code/Head’

Then in the page where I want the album to be displayed :


  • in the HTML Code CSS, I added directly all the code from “nanogallery2.min.css’
    and “nanogallery2.woff.min.css”
  • in the HTML Code Javascript, I added directly all the code from “jquery.nanogallery2.min.js”

Now I have a wonderful, fully responsive, photo gallery running like a charm in Rapidweaver, Stacks as well as within Alloy blog post.

Adding the nanoPhotosProvider2 extension to the nanoPhotosGallery2, is also a must !

And last but not least, there is also a standalone/online nanoPhotosGallery builder where you can test online the gallery