Topic: Shows don't open after upgrade to RapidWeaver 6

I recently upgraded to RapidWeaver 6. Since this time none of my previously (with RW5.3) generated shows do work. Every show was embedded on a HTML page and was properly working.

RW 6 apparently creates a different file index.hmtl containing the embedding code. After my modifying the source path from
src="jbcore/juicebox.js"
to
src="juicebox/jbcore/juicebox.js"
RW generates the index.html file with replacing the first quoble quote with

src=„juicebox/jbcore/juicebox.js"

which juicebox.js does not understand.

After undoing this replacement, at least juicebox.js shows a gray area and immediately the text message "Juicebox Error: Config XML file not found" though the config.xml file is still at the same place as it was before. Copying to whatever directory of this page does not help. Even using the option configUrl does not help (where RW6 again substitutes the first apostrophe with the HTML syntax which juicebox cannot deal with).

Re: Shows don't open after upgrade to RapidWeaver 6

It's not so much Juicebox that doesn't understand src=„juicebox/jbcore/juicebox.js" but your browser.
RapidWeaver may be escaping the initial double quote in order to display the actual embedding code as text on your web page.
Please make sure that you are entering your embedding code as HTML code rather than plain text.

Incidentally, „ is a double low-9 quotation mark. You should probably be using standard double quotation marks (which would escape to ") instead.

After undoing this replacement, at least juicebox.js shows a gray area and immediately the text message "Juicebox Error: Config XML file not found" though the config.xml file is still at the same place as it was before.

Please post the URL to your gallery's web page so that I can take a look and help further. The problem is likely to be the path to the gallery's XML file.

Even using the option configUrl does not help (where RW6 again substitutes the first apostrophe with the HTML syntax which juicebox cannot deal with).

Again, ensuring that you are entering your embedding code as HTML code rather than plain text should hopefully solve this problem. Chapter 7 in this web page may help with this.

Re: Shows don't open after upgrade to RapidWeaver 6

Thanks, Steven, for going into the details.

BUT: Juicebox proposes to copy the embedding code "as is" into the HTML page (it even provides a separate button for copying)! Which doesn't mean to modify the text, does it?

Nevertheless, I modified the embedded text:

src=„jbcore/juicebox.js"       ==which is the RW6 generated file==
to --> src=&quo;jbcore/juicebox.js"       /juicebox.js cannot be found
to --> src=&quo;jbcore/juicebox.js&quo;   /juicebox.js cannot be found
to --> src="jbcore/juicebox.js"           /now juicebox.js was found!

Since you refer to the browser's difficulties: I'm using the standard Safari browser, running with Mavericks, so what shall be wrong with this browser? Besides, visitors of the site will use a variety of browsers including Safari.
Firefox shows almost the very same behavior: juicebox.js was not found. After modifying the "src" statement to the latest line (see above) it runs juicebox.js, shows the line of thumbs and the buttons but leaves the main area empty (just displaying the juicebox busy icon, jbn-nav-touch-area).

Whereas Safari just shows a gray area with the jb-error-message. Going deeper I got this:

[Error] Failed to load resource: Origin null is not allowed by Access-Control-Allow-Origin. (config.xml, line 0)
file:///<<myLocalExportArea>>/fotos/Pix_WE2014_11/config.xml.

[Error] XMLHttpRequest cannot load file:///<<myLocalExportArea>>/fotos/Pix_WE2014_11/config.xml. Origin null is not allowed by Access-Control-Allow-Origin. (index.html, line 0)

The config.xml has a size of 14.3 KB. I compared it to the config.xml of a show generated with RW5.3 & JB 1.3: same structure. There runs no local web server. The embedding page is just plain HTML (no Ajax or else) with the embedded script code for Juicebox. Do you use Ajax? Because the error "Origin null is not allowed by Access-Control-Allow-Origin" may point into this direction (web search results do show this).

I cannot send you the URL of the site. Reason: it's still not published because of the not-yet-running-slideshows.
What I could do: send you the pure page (HTML) along with the juicebox show. Please tell me an address where to send it to.

Re: Shows don't open after upgrade to RapidWeaver 6

Juicebox proposes to copy the embedding code "as is" into the HTML page (it even provides a separate button for copying)! Which doesn't mean to modify the text, does it?

The embedding code should be copied into your web page unmodified as HTML code.
If RapidWeaver thinks that whatever you are pasting should be displayed on screen as plain text (rather than parsed by the browser as HTML code), then it will escape certain entities (as you have reported).
It looks like you may need to check that you are entering the embedding code as raw HTML rather than plain text. Please check the input mode on your editor.

I'm using the standard Safari browser, running with Mavericks, so what shall be wrong with this browser?

There is nothing wrong with this browser. My point was that if any browser sees a line such as:

<script src=&bdquo;jbcore/juicebox.js&bdquo;></script>

... then the browser will fail to load the 'juicebox.js' file into the web page and the Juicebox gallery will, therefore, fail to display (as that is no longer valid HTML code, having been modified by Rapidweaver).

Going deeper I got this:

The error message you pasted suggests that your gallery files may be on a different domain or subdomain to the web page containing the gallery's embedding code. All gallery files must be on the same domain or subdomain due to the JavaScript same-origin policy. Otherwise, you could implement a Cross-Origin Resource Sharing (CORS) solution by adding the following line of code to the .htaccess file in the root directory of the domain which currently hosts your gallery.

Header add Access-Control-Allow-Origin "*"

Please tell me an address where to send it to.

It would certainly help if I could see the code you are using and the file structure of your site.
If possible, please send me a zip file of your complete project. I have sent you a message with an email where you can forward it to me.
In the meantime, please make sure that you are entering your embedding code in RapidWeaver's raw HTML (rather than plain text) input mode so that your double-quotes are not escaped. I am not familiar with Rapidweaver but their own support (or a web search) should hopefully be able to help you with this.

Re: Shows don't open after upgrade to RapidWeaver 6

@Steven: Thank you very much for your quick response.

The embedding code should be copied into your web page unmodified as HTML code.
If RapidWeaver thinks that whatever you are pasting should be displayed on screen as plain text (rather than parsed by the browser as HTML code), then it will escape certain entities (as you have reported).
It looks like you may need to check that you are entering the embedding code as raw HTML rather than plain text. Please check the input mode on your editor.

The RW editor can take pure code. In this case the background becomes light green to make aware of this. This way I pasted the Juicebox code into the HTML page of RW. Don't know what the RW staff has modified with their new version 6 (there are lots of other bugs in there) to touch this piece of source code when generating the index.html file.

My point was that if any browser sees a line such as:

<script src=&bdquo;jbcore/juicebox.js&bdquo;></script>

... then the browser will fail to load the 'juicebox.js' file into the web page and the Juicebox gallery will, therefore, fail to display (as that is no longer valid HTML code, having been modified by Rapidweaver).

I completely agree!

Until upgrading from RW5.3 to RW 6.0, my workflow was like this: I created all pages of the site using RW. Everything was exported to my local hard disk. Then I copied all files & directories resulting from a Juicebox show into this specific folder where the HTML page resided. Everything locally! I checked the proper functioning of the site with Safari. Pages displayed, Juicebox shows did run. Everything was fine. Now I published the whole site to my web hoster via ftp. All right.

Now with RW6: the same workflow but different results: Juicebox shows do not run now. As a quick & dirty solution I copied all index.html files (from a backup of all pages created with RW5.3) into the same position. No other change: but everything was all right now! But this plain Q&D approach fails when modifying the menu structure of the site - being reflected on each page navigation.

The error message you pasted suggests that your gallery files may be on a different domain or subdomain to the web page containing the gallery's embedding code. ...

No, this cannot be. I described my workflow: at first everything is local under one directory. After uploading, everything is on the same domain. But now I'm going to answer your message.

Re: Shows don't open after upgrade to RapidWeaver 6

@Steven: just sent an email to you.

7 (edited by KR64 2014-11-15 09:21:05)

Re: Shows don't open after upgrade to RapidWeaver 6

Thanks to Steven's help I finally found the solution: it was an item of Safari's menu which was inactive:
Safari: "Developer > Deactivate local file restrictions" was NOT ticked. After ticking this item everything was all right: Juicebox shows immediately displayed without any problems.

Steven directed me to looking into Safari because he had had no problems with my files I had sent to him, neither with Safari nor with Firefox. Even after repeatedly clearing browser chaches and resetting the browser, there was no sign of success. After rebooting my iMac, suddenly Firefox displayed all of the shows! So the reason had to be with Safari itself. And some time later I became aware of this menu option which was not ticked but must be. I don't have a clue why this option was deactivated.

The difficulties with Rapidweaver 6 are smaller because they provide a dedicated HTML stack - this behaves better than the basis stack with text marked as code within this stack. Nevertheless, there are some oddities with editing code in Rapidweaver 6: while typing, the double quotes automatically become a double lower quote etc. I suppose this may be caused by the German localization of the operating system (Mavericks). In case of any problems I'd advise to manually edit the embedded code once Rapidweaver generated its files.

So this story finally came to a good end.

Re: Shows don't open after upgrade to RapidWeaver 6

I'm very happy to hear that you have been able to resolve your problem.
I'm glad I was able to help in some small way (by reporting my findings and at least pointing you in the right direction).
Thank you very much for taking the time to email me back to let me know and for posting details of your problem and solution in the forum thread.
Hopefully it will help other users facing a similar problem.