Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 34 replies, has 3 voices.

Last updated by egian145 1 year, 9 months ago.

Assisted by: Yvette.

Author Posts
June 14, 2022 at 10:48 am #11457115

egian145

Tell us what you are trying to do?

Issue No1: The image galleries in translated posts don't appear as galleries but as regular images (i.e. placed one after the other) This issue applies to both Gutenberg and Jetpack galleries.

Issue No2: I have selected the "language per domain" option. Translations are hosted on a domain alias (parked domain), per WPML instructions. The host company is SiteGround, which is on the approved list. I have also checked the " Auto sign-in and sign-out users from all domains" option (and logged out and back in after selecting it). However, I still can't preview a translated post before publishing it as admin (the preview link takes me to a 404 page), nor is the WordPress admin bar visible on top of a translated post when I view it.

Is there any documentation that you are following? WPML instructions for setting up "language per domain" sites

Is there a similar example that we can see? I've attached screenshots

What is the link to your site? hidden link

no-admin-bar-in-translated-post.jpg
gallery-in-translation.jpg
gallery-in-original-post.jpg
admin-bar-in-original-language-post.jpg
June 14, 2022 at 9:24 pm #11461615

egian145

By the way, I should note that there is also an issue with translated category links. Occasionally they will return a 404 page when clicked. This is fixed by re-saving the permalinks. But it is a recurring issue. I save the permalink settings, and categories work for a while but at some point, they stop and I have to save the permalinks again. The problem is that I don't know why it keeps happening and more importantly, I don't know when. So they could be broken for a few days before I click on a category link and realize it's broken again.

June 14, 2022 at 9:59 pm #11461649

egian145

While waiting for a reply, I keep trying to fix the issues. So I tried to use the WordPress Customiser while in the translation environment, and I saw the following message on the screen, instead of the translated site. I'm including it in this thread as it might be helpful to you.

Non-existent changeset UUID.
Warning: array_intersect_key(): Expected parameter 1 to be an array, bool given in /home/customer/www/flyingforktales.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-templates.php on line 59

Warning: Invalid argument supplied for foreach() in /home/customer/www/flyingforktales.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-assets.php on line 43

Warning: array_key_exists() expects parameter 2 to be array, bool given in /home/customer/www/flyingforktales.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-templates.php on line 71

Warning: array_key_exists() expects parameter 2 to be array, bool given in /home/customer/www/flyingforktales.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-templates.php on line 71

June 15, 2022 at 1:12 am #11462011

Marcos Vinicios Barreto

Hello,

Thank you for contacting our support service. I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

**IMPORTANT**

- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this: hidden link

Please, let me know if you need any additional details. Have a nice day.

June 15, 2022 at 10:07 pm #11470973

egian145

The problems due to our time zone difference are getting ridiculous. I've been waiting two days now and there is no progress whatsoever. There is no way we can collaborate given our 6 hours difference and your work schedule. I've had no choice but to send feedback to the management team about this. I'm sure that you mean well and that you are a skilled support representative, but our time zone difference makes it impossible to collaborate. Please assign my case to someone in a time zone closer to mine. Thank you.

June 17, 2022 at 6:27 pm #11486971

Marcos Vinicios Barreto

Hello,

Thank you for the updates and I really sorry for all the incovenience this way due our difference in timezone might be caused for you, although I am glad to keep helping you doing my best for that, I also can assign this ticket to one of our european support agents. As regarding your issue, I compared the posts below and I didn't notice any difference in the galleries:

English: hidden link
Greek: hidden link

Most source of this kind of issue happen when resources (JS, CSS, etc) are not correctly loaded in secondary languagues when they are set as different domains. It happens due CORs issues for example (see hidden link). So, here, we really would appreciate a specific post url where the issue happens. For the hidden admin bar, when I try to save the settings at WordPress Dashboard > WPML > Languages > Language URL format I see a Not valid error message for your secondary domain. Can you please, contact your host support and confirm if the secondary domain is properly setup?

According our support policies we are only able to solve one issue per ticket, so, for issues such as not found errors in translated categories links and for customizer usage in translated pages, I kindly ask you to create separated tickets for that.

Again, I really sorry for all the waiting here, once you reply, I will assign this ticket to another support closer to your timezone and we shouldn't have any additional waiting. Have a nice day.

June 17, 2022 at 6:38 pm #11487043

egian145

Hi Marco, thank you for your reply. In the meantime, I noticed, as you found out too, that galleries show correctly if the block type is "tiled gallery" instead of plain "gallery". That's why you didn't see any problem. Now I switched one specific gallery to the standard "gallery" block. I think "tiled gallery" is an extra block added by Jetpack.

Regarding the domain, yes I contacted them and they told me the domain resolves correctly. They told me to check with you instead. I don't know what to say :'( I'll open a new ticket for this issue, thanks.

June 21, 2022 at 7:10 am #11505503

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Paris (GMT+02:00)

Hello

I will be helping you now.

I understand that you have found that your issue is appearing when you use a particular block type "tiled gallery". Is that correct?

It may be that this particular block has an incompatibility with our plugins and is coded differently from the block "gallery".

Clarifications:

1. Do I understand the issue correctly?

2. To rule out any influence of the permalink structure, if you temporarily change your URL format to use "language per directory" instead of "language per domain" - does it make any difference to the behaviour of that block?

Once you test, you can change the URL back to what it was before.

4. Currently, I do not see that we are tested "compatible" with Jetpack here:
https://wpml.org/plugin/

As such, we would have to open a compatibility process for our team to investigate further. This would involve you recreating a simple example of the issue on a sandbox site that I will provide to you.

Before we do this, however, I would encourage you to approach the plugin author support to ask them for guidance or a workaround if another of their blocks works.

I wait for your feedback on these points.

June 21, 2022 at 8:04 am #11505879

egian145

Hi Yvette, thank you for your reply.

1. Well, not quite. It's the other way round. Jetpack is a hugely popular plugin, created by the company that created WordPress, so it's very unlikely it would have compatibility problems.

In fact, the only way to get images to appear in a gallery format is by using the Jetpack extra block "tiled galleries". It's the regular, built-in, "image gallery" WordPress block which doesn't appear correctly.

I disabled Jetpack and all image galleries got broken in the translated site.

2. I did as you suggested and, as I suspected, all three issues that I mentioned in my original ticket (see the start of the thread) got fixed! So it's not just the galleries, but all issues are interconnected and should in fact be treated as one issue, not three different ones.

More specifically, by choosing "language per directory" instead of "per domain", the following things happened:

- Image galleries appear correct

- The WordPress admin bar is visible in the translated site

- It is now possible to preview unpublished translated posts

- I can access the translated site with Appearance -> Customize, to make edits, although it looks odd (see here hidden link). In addition, still within Customizer, the translated version shows a "critical error message" at the bottom of the page.

Warning
: count(): Parameter must be an array or an object that implements Countable in
/home/customer/www/flyingforktales.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/wp-core-hooks/post/class-wpml-remove-pages-not-in-current-language.php
on line
37

Fatal error
: Uncaught InvalidArgumentException: target should be an object with filter method or an array in /home/customer/www/flyingforktales.com/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php:207 Stack trace: #0 [internal function]: WPML\FP\Fns::WPML\FP\{closure}(Object(Closure), false) #1 /home/customer/www/flyingforktales.com/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(152): call_user_func_array(Object(Closure), Array) #2 /home/customer/www/flyingforktales.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/wp-core-hooks/post/class-wpml-remove-pages-not-in-current-language.php(48): WPML\FP\{closure}(false) #3 /home/customer/www/flyingforktales.com/public_html/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(2271): WPML_Remove_Pages_Not_In_Current_Language->filter_pages(false, Array) #4 /home/customer/www/flyingforktales.com/public_html/wp-includes/class-wp-hook.php(307): SitePress->exclude_other_l in
/home/customer/www/flyingforktales.com/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php
on line
207

June 21, 2022 at 8:20 am #11506195

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Paris (GMT+02:00)

1. Blocks
Thanks - indeed, I got it exactly backwards. Sorry about that! I understand now.

2. URL Format
So it seems that the crux of the issue is here.

3. Site info
Is this a live site? Am I permitted to deactivate plugins temporarily as I attempt to troubleshoot the issue?

Please advise.

Thanks

June 21, 2022 at 8:31 am #11506257

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Paris (GMT+02:00)

I have been doing some investigating with key words "Siteground" and "memcache" as you seem to have this as a dropin plugin

I have seen issues reported for this setup. I am not personally familiar with Siteground - if you deactivate this or flush the cache - are you still unable to see the preview of the pages in the 2nd domain?

Thanks

June 21, 2022 at 8:34 am #11506279

egian145

1. No worries 🙂

3. It’s a live site but you may go ahead with any changes, my host creates backups every day automatically, so it’s safe. It’s also a new site, so traffic isn’t much of an issue yet 😉

June 21, 2022 at 8:47 am #11506325

egian145

Just saw your second message. Siteground is the name of the hosting company and they have an optimisation and cache plugin with the same name. I disabled it but unfortunately, the problem persists. When I click "preview" I arrive at a 404 page. I even disabled every cache setting from the host's admin site. I don't see the top admin bar either, etc.

While I was searching before opening a ticket, I noticed some people had found a workaround with some code in the htaccess or functions.php files (I don't remember exactly). But it wasn't the exactly same situation as with mine, so I wasn't sure and didn't want to make it worse.

June 21, 2022 at 9:11 am #11506525

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Paris (GMT+02:00)

For the issue of not being able to view "preview" of GR page, this behaviour disappears once I deactivate the SiteGround Optimizer plugin.

Do you agree?

Video: hidden link

June 21, 2022 at 10:02 am #11507439

egian145

Dear Yvette,

Well, the good news is that it works with the plugin activated too 😉

Video: hidden link

(in the video I've included also what customizer editing looks like for the translated site, with the error message at the end)

In addition, galleries look good and the admin bar plugin is visible on translated pages.

If you recall, I said that I disabled the Siteground plugin. But afterwards I also went to the hosting admin site and disabled/re-enabled all the cache settings there (see video: hidden link)

Perhaps that's why it now works? Regardless of whether the plugin itself is activated or disabled? Everything seems to be working fine, with the only hiccup that error message within Customizer ...

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.