I have generated a static site from a Drupal website by using wget. The static site works well in regards to working links and display of static images. However, in pages where Juicebox has been implemented as a gallery, the images cannot be displayed. I get the following error in the gallery placement:

Juicebox Error: Config XML file not found.

CommentFileSizeAuthor
Screen Shot 2016-10-25 at 11.50.56 AM.png26.71 KBbriankb

Comments

briankb created an issue. See original summary.

briankb’s picture

Title: Juicebox for statically generated Drupal sites » Juicebox for static Drupal sites
rjacobs’s picture

Component: User interface » Miscellaneous
Category: Bug report » Support request
Issue tags: -bug

I don't think that this is the kind of thing that can be considered a supported "feature" of this module. The issues you have is that Juicebox galleries are mostly generated client-side by the Juicebox javascript library. Part of this generation process requires making a separate javascript-initiated (AJAX-like) web request to fetch the gallery configuration via an XML response. This module makes all of that transparent within Drupal, but it is still a dynamic process.

All that said there are certainly still ways to do what you need to do. The missing piece is that your wget call does not trigger a request to the gallery XML (because this is ultimately done in JS on the browser-side). If your static copy of the site also contained static copies of this XML (at the same relative path it lives in your non-static site) then I think things would work. So if you scrape your site with a tool that executes the JS then I think that XML would get extracted statically just fine (I'm not aware of any way to do this with wget though). Or, if you only have a few galleries to capture, you could manually run a wget request directly to the XML paths for each gallery individually.

rjacobs’s picture

Status: Active » Postponed (maintainer needs more info)

I have not heard back in a while. Should we leave this open an longer?

briankb’s picture

Thanks Ryan for that advise. My apologies for the late response. I got preoccupied with some other projects but back on the one that had that XML issue.

Ideally, where are the XML files located on a non-static site i.e. a live Drupal site?

rjacobs’s picture

Status: Postponed (maintainer needs more info) » Active

Ideally, where are the XML files located on a non-static site i.e. a live Drupal site?

The XML is generated dynamically just like any other Drupal page. So there is no static storage of XML files. Sorry, I probably didn't explain that detail very well in my last comment. When I said that XML "lives" at a specific location I just just meant that there is a unique URL, that does not change, for the XML of each gallery. The XML is then generated dynamically upon a request to that URL.

If you are logged-in as an administrator you'll see a little "gear" icon when hovering over the upper-right corner of the gallery. Clicking on that will reveal some options, including a link to the XML itself. If you point your crawler (wget) to that XML URL manually you should be able to grab it statically.

briankb’s picture

Thanks. I'll try what you've suggested and get back to you ASAP.

briankb’s picture

Hi,

Sorry for getting back this late. Happy new year!

I followed your advice and it worked. Thank you. But I have a "million" of xml files to pull :)

You can now close this issue.

rjacobs’s picture

Status: Active » Fixed

I'm glad that you were able to fine a solution... even if it's slightly cumbersome. Thanks for following-up.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.