Topic: Juicebox Error: Cannot find div with id on drupal blocks

Hi, I'm working on a drupal based website and I made a gallery block and when I try to enter on the page I get the following error: Juicebox Error: Cannot find div with id: "viewsstyle--galer-a-de-escalada--block-1"

¿Someone could help me with this issue?

You can visit the website here: http://www.climbingvenezuela.com/drupal … da-en-roca

I get his error in all pages has a gallery block. Another important thing is that the error not always appears.

Re: Juicebox Error: Cannot find div with id on drupal blocks

I have viewed your website and your Juicebox gallery displays and functions OK.

If the error does not always appear, then it sounds like the problem may be with either your web server or internet connection.
Code being parsed by a browser should be 100% consistent. An intermittent problem can often be due to a timeout error (a file not being served/fetched from a web server in a timely manner).

Juicebox should embed itself into the gallery container only when the web page is complete and the gallery container has become part of the Document Object Model. If, for some reason, your web page has stopped loading and your browser thinks the page is complete before the gallery container has become part of the DOM, then you may see the error message you reported. Juicebox cannot find the gallery container because it has not yet been defined in the page at the time the Juicebox code is run (when the browser decides the DOM is ready).

Check with your web host or internet service provider to see if they have recently been experiencing any issues which might be contributing to your problem.

Also, check in the Drupal forum (https://drupal.org/search/site/juicebox?f[0]=ss_meta_type%3Aforum-issues) to see if anyone else using the Drupal module has been experiencing similar issues.
Please note that we did not write the Juicebox module for Drupal ourselves and support for the module would be better directed towards the Drupal forum where the author of the module should be able to help you further.

Re: Juicebox Error: Cannot find div with id on drupal blocks

Hi Steven,

After several attempts trying to solve the error I realize that the error is associated to the version of the Module I was using 7.x-2.0-beta5 and now 7.x-1.2. I know the Drupal issues are discussed in the Drupal forum, but I did not find any related issue with the same error.

I notice that the error is related to this part of the code:

<div class="view-content">
      <script>
  new juicebox({
    configUrl : '/juicebox/xml/view/galeria_corporativos/block_1?checksum=16f71d04dbcd46449861097728e5ab63',
    containerId : 'view-galeria_corporativos-block_1',
    galleryWidth : '300px',
    galleryHeight : '300px',
    backgroundColor : '#222222'
  });
</script>

In the latest version this code is before <body>

Now the gallery block work like a charm.

Thanks for your fast response.

Daniel.

Re: Juicebox Error: Cannot find div with id on drupal blocks

Now the gallery block work like a charm.

That's great!
Thank you for posting back to let me know.