Topic: Juicebox + WPML problem

Hello!

I have a problem with my Juicebox gallery.

My website and the problem is here: http://clublasvegas.sk/galeria/?lang=hu

The plugin just loading and loading...forever.

How can I solve the problem. I want a multilingual site WITH the juicebox plugin.

Thanks in advance!
Menti

Re: Juicebox + WPML problem

When using the WordPress Media Library as a source of images for a gallery created with WP-Juicebox, Juicebox will display all images attached to the post containing the gallery.
However, it looks like you have no Media Library images attached to the post containing your gallery.
Go into your Media Library and check that your images have been attached to the correct post.

If you find that you you have no images attached to the post (which is what your gallery's XML file currently suggests), you can either:
(1) Attach images to the post from within the Media Library itself. (Please note that WordPress allows you to attached Media Library images to only one post so if you have images that are already attached to posts and you wish to include them in a WP-Juicebox gallery, you will need to upload them again.)
... or:
(2) Edit the post containing the gallery, click the 'Add Media' button (above the editor's toolbar) and add images to the post in the pop-up window.

Re: Juicebox + WPML problem

I'm having the same problem here.

Translating a post containing a regular media gallery works fine. But translating a post containing a (working) juicebox gallery leads to both the original and translated page showing just an empty juicebox gallery (black screen).

There seems to be a compatibility issue between wpml and wp-juicebox.

Could someone investigate the issue please ?

Re: Juicebox + WPML problem

@graphicsxp

Unfortunately, I am not familiar with the WPML plugin and it is not free so I am unable to download it to test.
Perhaps if I saw the problem live on one of your web pages I might be able to determine the cause of the problem.
It sounds like the plugin might be trying to translate the gallery's dynamically-generated XML file (created on-the-fly by the 'wp-juicebox/config.php' file). Does the plugin have an exclusion zone where you can add files or pages that you do not want to be translated? If so, try excluding the the 'wp-juicebox/config.php' file or even the entire contents of the 'wp-juicebox' plugin folder.

Re: Juicebox + WPML problem

I've opened an issue with WPML and they think that wp-juicebox may not be compatible with their plugin:

https://wpml.org/forums/topic/wp-juiceb … ost-609369

Since WPML is the most used plugin in the world for translation, do you think you can work out the problem directly with them ?


Are you talking about the gallery xml file ? I've checked the file and it was not translated by the plugin.

What happens is that when you translate a post, it creates a new gallery (new xml file) and link it to the new post id  (the translated post). Therefore it links to the exact same images already used in the original post. Maybe that would be the problem ?

Re: Juicebox + WPML problem

When you publish or update a post containing a gallery shortcode, the post id is written to the gallery's XML file (in the 'wp-content/uploads/juicebox/' directory). The gallery will then be associated with that post and will display the images attached to it.
If you have the same gallery shortcode in multiple posts, then the post id which is written to the gallery's XML file will be that of the post which was most recently published or updated which contained its shortcode.
(Each gallery should be associated with only one post and you should not have the same gallery shortcode present in multiple posts.)

If WPML duplicates an original post to make a new translated copy, then the gallery shortcode will be present in two separate posts and I suspect that the post id associated with the gallery will be that of the new post. Therefore, when you try to view either post (the original or the new post), the gallery will display the images attached to the new post.
The fact that no images display suggests that there are no images actually attached to the new post.
To check, try editing the new post, click the 'Add Media' button and select 'Uploaded to this post' to see what images (if any) are attached to it.

It might still help if I could see your broken gallery live on your web server but I suspect that from what you are saying (and my notes above) that WP-Juicebox may not be compatible with WPML and would need to be rewritten to change the way it works.

Bear in mind that you could still embed a Juicebox gallery manually in a WordPress post using the baseUrl method documented here. Such a gallery should work fine with WPML.

I will certainly keep an eye on the thread you created in the WPML forum, though.