Topic: When updating post after publishing, JB Gallery disappears

I've found a quirk (that may be normal).  The only way I can find to make certain my JB gallery embeds is to write the post and do any formatting prior to pasting the embed code.  If I go in afterwards and change any formatting or edit any text, although the embed code remains untouched, the gallery disappears on the page.

Re: When updating post after publishing, JB Gallery disappears

It sounds like WordPress may somehow (perhaps by switching between 'Visual' and 'Text' input modes) be inserting formatting within the embedding code which is effectively corrupting the JavaScript code.
Take a look at the source of the web page containing the gallery in your browser to see if the embedding code looks OK.

Re: When updating post after publishing, JB Gallery disappears

I hate to revive such an old thread, but I am finally getting around to troubleshooting this.  I've just been living with it.  I've taken a look at the source code for a page with a JB gallery that is working and a gallery that isn't, and it looks like WP is inserting something.

Good code:
<!--START JUICEBOX EMBED--><br />
<script src="/wordpress/wp-content/Juicebox_Galleries/MakerSquare2/jbcore/juicebox.js"></script><br />
<script>
  new juicebox({
    baseUrl : '/wordpress/wp-content/Juicebox_Galleries/MakerSquare2/',
    containerId : 'juicebox-container',
    galleryWidth : '800',
    galleryHeight : '600',
    backgroundColor: '#222222'
  });
  </script></p>
<div id="juicebox-container"></div>

Bad code:
<p><!--START JUICEBOX EMBED--><br />
<script src="/wordpress/wp-content/Juicebox_Galleries/Harmontown/jbcore/juicebox.js"></script><script>// <![CDATA[
  new juicebox({
    baseUrl : '/wordpress/wp-content/Juicebox_Galleries/Harmontown/',
    containerId : 'juicebox-container',
    galleryWidth : '800',
    galleryHeight : '600',
    backgroundColor: '#222222'
  });</p>
<p>// ]]&gt;</script></p>
<div id="juicebox-container"></div>

It's added a few things in there, seemingly at random.  Has anyone else had this problem?  It's happened with every version of WordPress (I'm on 4.0 now).

Re: When updating post after publishing, JB Gallery disappears

The <p>, <br /> and CDATA tags are not being inserted by WP-Juicebox.
It looks like these tags are being inserted by WordPress's wpautop function.
Perhaps your current theme is using this functionality.
Try temporarily reverting to a default WordPress theme to see if this makes a difference.
I have a test WordPress installation currently using the Twenty Fourteen theme and the embedding code visible in the source of the web page does not have <p>, <br /> or CDATA tags .

Try installing the wpautop control plugin and use it to disable wpautop in your pages and posts containing WP-Juicebox galleries.