Topic: Config.xml not found

trying to use the embed code to place a gallery within a web page.    Last effort was to give a full path to where the config.xml file is.  The folder "Moon" has the config.xml, a thumbs folder, a jbcore folder, and an images folder.  I have not yet been able to view the gallery offline, haven't made the recommended security changes to Firefox, but this doesn't really give me hope that that would work.  I do get a nice grey box, so something has been found. 

Have I got a syntax error here?  Thanks! 

<!--START JUICEBOX EMBED-->
<script src="https://astrodork.name/Moon/jbcore/juicebox.js"></script>
<script>
new juicebox({
configUrl: "https://astrodork.name/Moon/config.xml",
baseUrl: "https://astrodork.name/Moon/",
containerId: "juicebox-container",
galleryWidth: "100%",
galleryHeight: "100%",
backgroundColor: "rgba(34,34,34,1)"
});
</script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->

Re: Config.xml not found

Your code looks like it should work online but if you're trying to view it locally, it's possibly failing due to having a mix of file:/// and https:// protocols (file:/// when loading the gallery's embedding page and the use of https:// in the embedding code paths).

When you use a baseUrl and your configuration file is named 'config.xml' and is located directly inside the gallery folder (default name and location), then you don't need to use a configUrl at all. You can remove the configUrl from your embedding code and that'll be one less path to worry about.

Also, you could try using relative paths for your 'juicebox.js' path and baseUrl (relative to the web page containing the embedding code) instead of absolute paths (starting with https://). This should work online and locally (after you've made the necessary Firefox browser tweak noted here).

Re: Config.xml not found

Thanks!!!

I did see that I had a path error and will try moving stuff to eliminate the configUrl.  (I had for whatever reason added www to my page name, which tripped an error in java script because I was moving between two different site names, the https:// and the https://www. location. )  Looking at the inspector in Firefox helped, the error was
"CORS Missing Allow Origin" 

Working now, have a wonderful Christmas.

Re: Config.xml not found

Working now,

That's great! Thank you for letting me know.

Just a couple of notes which might help to clarify things (maybe for other users reading this thread)...

... will try moving stuff to eliminate the configUrl

Just for the record, having looked at your code and site, you should have been able to just eliminate the configUrl entry from your embedding code without having to move any files around (as your gallery's configuration file was named 'config.xml and was located directly inside the baseUrl gallery folder).

Looking at the inspector in Firefox helped, the error was "CORS Missing Allow Origin"

Using relative paths is usually the best way to avoid CORS issues.
If you use an absolute path in your embedding code which starts with https:// and includes the www subdomain (for example), then a visitor to your site would have to use https:// and www for the URL in their browser's address bar. If the visitor used http:// or omitted www, then this could trigger a CORS issue. If relative paths are used, such issues can be avoided.

Also, if you were to use absolute paths in your embedding code, then you'd need to ensure that they all use the same protocol (http:// vs https://) and the same domain/subdomain. If there's a mismatch, then the gallery would likely not be displayed, no matter what a visitor might use for the URL in their browser's address bar.

Incidentally, relative paths can either:
(1) be relative to the web page containing the embedding code.
... or:
(2) start with a leading slash which denotes your root directory (and, in doing so, you can build up the relative path starting from the root, rather than the directory that the embedding page is in).

... have a wonderful Christmas.

Thanks! You, too!