Hi,
- i installed the module (libraries is working fine)
- kopied the content of jbcore into the libraries/juicebox folder
- made a new ct with an image field with unlimited values
- set the display mode of this image field to juicebox.
- added a new gallery, uploaded images, showing all fine

But no images are showing in the gallery.

http://www.welters.be/jbtest

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rjacobs’s picture

Hi roelwelters,

It could be that you did not copy-over the complete contents of the jbcore directory (including the theme files) into the sites/all/libraries/juicebox folder. For example, a css file should load at the following request:

http://www.welters.be/sites/all/libraries/juicebox/classic/theme.css

...but I'm getting a 404 when I try that. You'll also want to also be sure that all the library files have read-permission by your webserver so they can be served-up.

Let me know if that helps.

el_pirata’s picture

I've got the same problem here: http://www.brainsaladsoftware.ca/test

rjacobs’s picture

el_pirata, I think your situation is a bit different from roelwelters. From the example that you sent it looks like the Juicebox field formatter display is not actually active for your image field. Please confirm that you've completed step #2 (and saved your settings) from the section "Using the Juicebox field formatter (nodes/entities are galleries)" in the documentation.

mfgr’s picture

And another one! I have just created a gallery with 9 images in one node, and this is the result...
[URL]

If you look at the page code, you will see that a Juicebox gallery is actually created.

rjacobs’s picture

mfgr, there appears to be something corrupt about your juicebox.js file at:

[your-domain]/sites/all/libraries/juicebox/juicebox.js

When I load your page (with my browser console active) I get a javascript syntax error pointing to that file:

SyntaxError: identifier starts immediately after numeric literal

Also looking at it in an IDE reveals a bunch of syntax warnings. You might want to re-download the Juicebox javascript library from juicebox.net and re-upload that to your server to rule out direct issues with the contents of that file.

mfgr’s picture

Thanks, that did it for me. Weird that the download was apparently corrupted, but there you go!

rjacobs’s picture

@mfgr, glad that sorted it out, thanks for confirming. I hope my comments also helped the other 2 posters who were experiencing similar symptoms (but most likely with very different causes).

madhusudan’s picture

Facing same type problem... I checked all permission and checked the library files css&js loads properly.
In my case, I see a big box and inside a rotator icon.
I can add edit images but not able to view!, I have attached the screenshots..

what could be the problem...

rjacobs’s picture

Hi madhusudan,

This typically means that the XML-based image data, which is being fed to the Juicebox javascript for display, has some issues. The easiest way to see what might be going on would be to look at that XML. Would you be able to share a direct link to this broken gallery (the same one you took screenshots of)? That would help quite a bit.

madhusudan’s picture

@rjacobs,

Thanks for quick reply. unfortunately I cannot share the URL becoz its internal,

which XML file you are pointing to..? is it config.xml ?

here is my setup
I am running Ubuntu 12.04.3 LTS & running the site locally, &using simplecorp theme

Different browser shows different error!, when I load the page in "Firefox" it shows the blank box as i mentioned in my previous comment, but when the same page is loaded in chrome it shows the same box but inside it throws error "Juicebox Error: Config XML file not found"

I found the config.xml file in juicebox library folder but outside jbcore folder. but in your documentation its not mentioned to place the config file, its just mentioned to place jbcore files.

next I placed the config.xml file in the juicebox library then flushed all caches & reloaded the page in chrome,but still the same error!.

update
looks like I am facing this type issue

https://drupal.org/node/1945624

I dont have any developer module installed neither form AP validation module.
dono what other module is messing up with this.. will have to check.

rjacobs’s picture

@madhusudan. The XML (the "config.xml") is generated dynamically by the module, so there is no need to place a static version of that anywhere. My guess is that there is some incompatibility or misconfiguration that is leading to some problem when that XML is generated, so having a look at the specific XML outputs for your gallery could help id the problem.

My suggestion is to have a look at the embed code itself (within the page that the Gallery should appear on, but does not) and see what the XML path is set to. If you view the page HTML you'll find some code that looks like the following:

<script>
  new juicebox({
    configUrl : '/juicebox/xml/entity/node/33/field_gallery/default',
    containerId : 'juicebox-xml-entity-node-33-field_gallery-default',
    galleryWidth : '100%',
    galleryHeight : '500px'
  });
</script>

In this example the XML path is "/juicebox/xml/entity/node/33/field_gallery/default". Can you try to visit the URL (whatever version comes up in your case) directly in your browser and let me know what you see? This is a relative path so in your case you would need to add "http://localhost" to it (e.g. http://localhost/juicebox/xml/entity/node/33/field_gallery/default). If all is working correctly your browser will show you a bunch of XML and if not the specific error the results, such as "not found" or "access denied" will be useful to note.

Also, no matter what results you encounter from this test, can you let me know what your specific XML URL is... or simply just paste the full embed code you find into this issue report? All these details might shed some light into what might be unique about your case.

madhusudan’s picture

@rjacobs,

This is my Juicebox HTML code.

new juicebox({
    configUrl : '/drupal7/juicebox/xml/view/juicebox/page?checksum=fabc5dfb4bd825b7470d5c9227f65410',
    containerId : 'view-juicebox-page',
    galleryWidth : '100%',
    galleryHeight : '100%'
  });

and when I load the configurl i get XML error as below

XML Parsing Error: XML or text declaration not at start of entity
Location: http://localhost/drupal7/juicebox/xml/view/juicebox/page?checksum=fabc5dfb4bd825b7470d5c9227f65410
Line Number 1, Column 2:	<?xml version="1.0" encoding="UTF-8"?>
--------^
rjacobs’s picture

madhusudan, this seems to indicate that something is adding whitespace (possibly a whole blank line) to your Drupal output. The XML parser is pretty strict about this and will throw errors instead of ignoring the whitespace.

This is very likely related to another module or theme that you have enabled. Any included module code that adds any whitespace before the <?php script tag, or after an ending ?> tag, will shift the final output in the browser (even if that module isn't activity processing the output). So you may simply have a module/theme active that has some badly-formatted php code.

In fact, this is most likely similar to what was reported in that other issue you referenced (but involving another, unidentified, conflicting module): #1945624: Theme developer module corrupts Juicebox XML structure (Images are not loaded on to the gallery) and #1962548: Form API Validation module <= 7.x-2.0 breaks Juicebox (and probably many other modules)

You'll probably want to start disabling custom and contrib modules/themes one-by-on and re-checking that XML request to see if the error goes away. If you are able to link it to a specific conflicting module, you'll definitely want to tell the maintainer about it, and report back here so others can be aware of the conflict. Even if you don't use Juicebox this kind of conflict can cause problems in plenty of other modules that you may use.

If you are still able to reproduce this issue/error on a clean Drupal install, we can definitely investigate further, but my best guess is that this is directly linked to another 3rd party module.

nasia123’s picture

Could this be related to php settings ? max_execution_time, max_post_time ?

madhusudan’s picture

@rjacobs,

Thanks for the information, I disabled modules one by one and found my custom module to be responsible for the error. I still had doubt whether its affecting only your module's RSS or site wide's RSS, and navigated to my site RSS feed http://localhost/rss.xml and there also I found white spaces at the beginning of XML.
I checked my module there was a tab space before "<?php" so that was causing the problem.
I removed that tab space and it worked!.

PS:
Ignoring the white-space would be much easier becoz these types of small mistakes goes unnoticed.
XML parser should reconsider its syntax checks!.

rjacobs’s picture

@madhusudan, I'm glad you found the source of that problem. Yes, it would be nice if the XML parser could handle that whitespace gracefully, but given that the parser is part of the browser itself, I'm not sure it's behavior that can be altered. I'm not even sure if the Juicebox javascript can gracefully bypass that error when requesting the XML, though that would be something the Juicebox javascript library developers would have to speak to. Also, because that whitespace is often added to the page as a result of hardcoded whitespace in other modules/themes, there is not really anything this module can do to detect/trim it. Someone can correct me if I'm wrong on this, but I don't know of any way to do it. Even if we could do something about it, it would probably be bad practice to do so as it would be masking what is, essentially, invalid markup.

Edit: It actually looks like there could be a workaround for this, but it's not one I'm sure we should implement. See: #2312037: There is whitepspace in your Juicebox XML that causes problems, is there something you can/should do about it?

@nasia123, I suppose the only server-side settings that could come into play would be those that could affect the speed at which page content (XML in this case) can be delivered after the request. If the XML request takes a very long time the Juicebox javascript could theoretically timeout in some way when building the gallery, though I'm not aware of any such timeouts that might come into play. That too would be something that the Juicebox javascript library developers would have to speak to. Either way, I'm guessing that this could only really be a factor for exceptionally large galleries.

nasia123’s picture

You say here https://drupal.org/node/1906860 that caching is really not helping ...

should drupal page or block caching be turned off for juicebox block/pages into views or panels ?

rjacobs’s picture

nasia123, the message from #1906860: Notes on performance when core page caching is disabled. was that without core caching enabled, some Drupal gallery "building" logic must be executed twice (once for the embed page and again for the XML request). Because of this I was exploring the idea of adding some local caching to the module itself. That said, with core caching enabled there is in fact a distinct advantage for anonymous users:

When core page caching is on, both the main gallery page and its config XML data will be cached by Drupal, so any caching this module could do itself would not offer any advantage in this case.

Anyway, you could try turning off Drupal page caching to see if that's somehow a variable in your case. This, of course, would come with a performance disadvantage for your whole site (Juicebox included), so you would probably just want to alter these caching settings for testing purposes only.

I also suspect that the root problem for your case is different from the others that have been discussed in this thread. I'd suggest opening-up a new issue report (just tag it as a "support request" for now) so there is a more dedicate place to look at your issue.

rjacobs’s picture

Status: Active » Closed (works as designed)

I'm going to mark this thread as "closed" as I think it's gotten a bit fragmented (the issues being discussed are actually not related). If anyone continues to experience a non-specific "no gallery displaying" problem it'll probable be best to open up a separate issue report (support request, etc.) that includes as many specifics about your unique case as possible. Of course, before doing this, be sure to search the issue queues to see if the issue has already been answered.

Also, from what I can see the initial (active) reporters have resolved their problems.

nasia123’s picture

I had a strange situation were I had the config xml file not found error, but if I typed my xml's address on the same browser running tha javascript, I could see my xml and wothout errors.

At first I though it was an issues with IIS, on my server, then I just thought that there could be a reason why there is a cached wrong xml version because there were users updating the gallery on a daily basis.

I was using a block to create my gallery...
well I first found out that disabling block caching on drupal, displayed my gallery , no "config xml not found error" .
but since I may at some time want to have my blocks cached, I decided to re-do my gallery views, only this time use a page display, not a block.

So now I see my gallery all the time..

rjacobs’s picture

@nasia123, another user has traced a problem to views + block display + caching here:

#2117221: Views block displays, using Juicebox display formatter, may trigger XML errors when views caching active

It looks like there are some definite parallels to your case. As a result, I've copied your comment (#20) to that space. Feel free to add other comments over there as well if needed. Core block caching must be doing something special during views rendering that I'll have to look into.

A_S_312’s picture

If you don't like swich on/off modules to seach for bad output or this method does not work, try to replace line 182 at file juicebox/includes/JuiceboxGallery.inc
From:
return $dom->saveXML();
To
return $dom->saveXML($juicebox);
Original discusion can be found hear .

rjacobs’s picture

Issue summary: View changes

Regarding comment #22, this suggestion has come up in a few different places previously. Anyone is of course welcome to make that change as a temporary workaround, but I generally advice against it. Making that change means that you will be masking an issue with your Drupal install (not related to this module) that you may really want to address in order to avoid other future headaches. For more info, please see (and comment in): #2312037: There is whitepspace in your Juicebox XML that causes problems, is there something you can/should do about it?.

simnav’s picture

Juicebox gallery was working fine earlier but now its show blank white box with error "Juicebox Error: config file not found"
view source juicebox":{"field--node--255--field-event-gallery--full":{"configUrl":"\/juicebox\/xml\/field\/node\/255\/field_event_gallery\/full?checksum=59a2d780a673f9d4ce92b687fdc987b7"

when i paste the url directly "juicebox/xml/field/node/255/field_event_gallery/full?checksum=59a2d780a673f9d4ce92b687fdc987b7"

then it shows "Page not found"

and the html code is