Hi there,
I think I know what is causing my issue, but not how to fix it. I'm trying to integrate the module with an entity type generated by the Drealty (https://drupal.org/project/drealty) module. It's a remote feed of real estate listings. I had it working fine, but I've obviously done something to break it, or another module has cause it to mal function. i think it's related to this:
https://drupal.org/node/2058941
but I'm not sure how, or to be honest, where to go about creating a callback that would fix the issue. If I remove the Juicebox as the image renderer the images show up fine, so it something with Juicebox no longer recognizing where the images are, I think.
The data is refreshed ever 24 hours, so I'm not sure if that's contributing to the issue, perhaps flushing the xml configuration file.
Any help or suggestions on where to look would be greatly appreciated.
Sincerely,
Droddis
Comments
Comment #1
rjacobs commentedHi Droddis,
You mentioned that things were working at one point recently. Can you confirm whether-or-not they were ever working with a 7.x-2.x version of the Juicebox module? If so, it's unlikely that the entity API "access callback" concept is to blame (https://drupal.org/node/2058941) as that special access requirement has been around since the first 7.x-2.x release (7.x-2.0-beta1). Also, from what I can see the drealty module does have an entity api access callback in place, so access checks on the Juicebox XML are hopefully honored.
Can you describe the specific errors/issues that you encounter? Are you seeing errors on the screen or within your Drupal watchdog logs or php error logs?
I'd also suggest temporarily enabling "debugging" in Juicebox at
admin/config/media/juiceboxby checking the "Show links to debug info" option. After this you should see a "debug info" link at the top of space where the gallery would normally appear, and clicking on it will show some helpful info. For example you can see the direct link to the Juicebox XML file for that gallery, which you can also click on to try and load the XML directly in your browser. This can reveal whether-or-not an XML request is leading to an "Access Denied" message or similar.Finally, are you able to share a direct link to a gallery page that displays this problem? That can also be very helpful.
Comment #2
droddis commentedHi rjacobs,
thanks so much for your prompt reply. It was working with 7.x-2.x recently, this has all taken place over the last week or so.
I enabled the debug options and tried to open the xml path, here is the displayed error:
XML Parsing Error: XML or text declaration not at start of entity
Location: http://atlanticprorealty.com/drupal/juicebox/xml/field/drealty_listing/5...
Line Number 4, Column 1:<?xml version="1.0" encoding="UTF-8"?>
The link to the actual site is below (still under construction):
http://atlanticprorealty.com/drupal/listings/40672073
It seems like there is a specific xml issue, but I don't know if it's not creating an xml file, I can't seem to find one in the folder tree on the server, or if there's some other issue. Perhaps a path messup in terms of where it expects to find an xml file but isn't. What controls where/when the XML file is created/stored?
Comment #3
rjacobs commentedThe XML is generated dynamically, like other normal Drupal pages. Though it can be cached within Drupal's page cache, it's not actually "stored" anywhere in a static way.
Anyway, this looks like a whitespace issue. Check out the notes here:
https://drupal.org/comment/7977753#comment-7977753
Basically it looks like you have a module somewhere that's got a blank line in the code and is corrupting all XML output from Drupal. It can be a bit tricky to track down the problematic file, but if you can link the onset of the problem to other changes you may have made (upgrading other modules, etc.) you may be able to isolate things. Either way, those linked notes about should help.
Also, I should note that I got an access denied message when I tried to access that XML URL (http://atlanticprorealty.com/drupal/juicebox/xml/field/drealty_listing/5...), which is strange given that I am still allowed access to the related entity's page (http://atlanticprorealty.com/drupal/listings/40672073). So there may also be an access issue to solve in your setup, but that will be best to address after you can eliminate the specific XML error that you referenced above.
Comment #4
droddis commentedGENIUS!
Thank you so much, it ended up being a custom module Ihacked together to get better looking exposed filters for a search.
You were 100% right , it ended up being white space before and after the
Thanks again, I really appreciate the help.
Comment #5
rjacobs commentedGood to hear, glad that was the fix. Hopefully that also means that the access concepts are not an issue.
Comment #6
rjacobs commentedIt also sounds like we should mark this fixed.
Comment #7
droddis commentedYes please close it. though I am seeing the error again for unauthorized users. I looked through all the drupal permissions and they look fine. would this be more related to folder permission issues on the file server?