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 16 replies, has 2 voices.

Last updated by Bobby 1 year, 10 months ago.

Assisted by: Bobby.

Author Posts
February 27, 2023 at 3:48 pm #13126717

danieleB-5

Hello, this problem has already been reported by my colleague in Italian but I guess we'll understand each other better in English.
So, we have translated a couple of pages on the above website, and the translated pages are problematic.

This is the original page:
hidden link

This is the translation in English (happens with French, too):
hidden link

See what happens? The translated page should retain the original's layout, instead the layout is boxed, contained inside the structure of a WordPress post.

All that white margin, the Page title, author, date at the top and the widgets at the bottom shouldn't be there, it should simply look like the Italian version.

So can you help us understand why this happens? It never did on any other of out translated websites.

Thanks.

Daniele

February 28, 2023 at 1:49 am #13130339

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hi there,

Sometimes this can happen when the page layout template has not been copied over to the translation, OR if the theme you are using has theme options within the page that control the layout.

Go to hidden link and click on "edit page" and dismiss the warning -> this will open the page in the WP backend editor -> review the layout template does it match with the one selected in the default language?

February 28, 2023 at 8:00 am #13131891

danieleB-5

Yes, it's the default template in both cases. The strange thing is the page looks like it's using the post template, though. By the way, we're using Divi.

February 28, 2023 at 7:29 pm #13139181

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Go to WPML->settings->Custom Fields Translation-> enable "Show "Multilingual Content Setup" meta box on post edit screen." go back to the page and edit the default language page.

Scroll to Multilingual Content Setup ( bottom of edit page now) and click on "show system fields"

Share a screenshot of all the fields with me to review.

There is a possibility a field is misconfigured unless there is a fatal error not registering that is breaking the layout.

For this purpose also check the error log and share it with me as well.

You can see how to enable debug logging here:
https://wpml.org/documentation/support/debugging-wpml/

This will create an error_log.txt file in your site's root directory. Please send me its contents.

March 1, 2023 at 9:05 am #13142649

danieleB-5

Ok, here is the screenshot. As far as the debug log goes, no file was created but if I enable debug display nothing comes up on the site either, so I guess there are no fatal errors. The browser console is showing the usual stuff about cookies.

Clipboard01.jpg
March 1, 2023 at 6:09 pm #13147949

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Thank you, are there any fields when you click "mostra i campi di sistema" this should show more fields and most likely the ones we need will be shown.

March 2, 2023 at 1:01 pm #13155089

danieleB-5

Yeah, sorry, I hadn't caught that part. Here is the screenshot.

Clipboard02.jpg
March 2, 2023 at 9:21 pm #13158871

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

I would like to request temporary access (wp-admin and FTP) to your site to test the issue.
(preferably to a test site where the problem has been replicated if possible)

**Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken **

I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/
You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you enter is private which means only you and I have access to it.

NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin.

Thank you,
Bobby

March 5, 2023 at 6:23 pm #13174121

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Thank you for the access details!

Go to plugins-> deactivate VikBooking and re load the pages not working.

It looks like this plugin is causing this behavior.

I'd recommend reaching out to the authors regarding this issue ass they should know their code best and possibly provide a quick resolution.

Also, recommend to them to join our go global program which helps them become officially compatible with WPML and to resolve any potential compatibility issues.

https://wpml.org/documentation/support/go-global-program/

March 7, 2023 at 3:37 pm #13191287

danieleB-5

Hello, so they checked it out and replied. I'll add the translation below (originally in Italian).

"Good morning,

We investigated the situation with our developers, and it turns out that your Theme behaves differently when WordPress fails to link a certain URL to an existing Post ID (page).
We collected the information for different combinations of addresses, and we noticed that only the /rooms page works correctly allowing WordPress to find a correct page ID, and therefore its theme to behave accordingly. Below are the details of the URLs we tested.

hidden link = post ID 133 ("Camere")
hidden link post ID not found (0) then theme error.
hidden link post ID 2566 (Roomsbaak)
hidden link post ID not found (0) then theme error

The fact that the problem occurs only with VikBooking active is a pure coincidence as our plugin needs to call the native WordPress function url_to_postid() to understand what is the ID of the page in use, and whether or not to render a our Shortcode. This WordPress native function applies a filter called "url_to_postid" to which your theme or some other plugin is registered, and in case this filter/hook fails, your theme behaves differently.

We have already modified the source code, and using the remove_all_filters('url_to_postid') code its Template behaves correctly even in pages that have not been configured correctly and therefore do not return a correct Post/Page ID. This is irrefutable proof that the theme's behavior is tied to this native WordPress hook.

In conclusion, if WordPress could find a page ID for each of the URLs mentioned above, it would have no problem. From this we can confirm that VikBooking is absolutely not responsible for this malfunction, and there is nothing our plugin can do to solve the problem. The problem is that its URLs do not match any page according to WordPress. If, on the other hand, they corresponded to a page, i.e. the native function "url_to_postid" returned a valid ID, its Theme would not change its behavior just like it happens with the /rooms page in Italian, which is the only one to have been configured correctly.
Check your WPML or Theme configuration because that's where you should fix it from. If any other plugin called that native WordPress function, it would have the exact same behavior. This is to let you understand that our technical analysis shows that VikBooking is not in the least responsible for the behavior of the theme or the URLs generated for the various pages by WPML."

March 8, 2023 at 1:40 am #13194269

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Thank you for updating me! Where you able to review your page IDs and connections?

Unfortunately, the previously shared login area is no longer working for me to take a look at the backend.

March 8, 2023 at 9:31 pm #13201953

danieleB-5

Aren't page IDs completely automatic? I can give you access again, but the user I made for you is still active, you should be able to login.

March 9, 2023 at 9:34 pm #13211899

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Thank you I was able to access it.

To be quite honest I am confused by the answer from their support. The ID is not missing as you can see it's 133 for IT and 3528 for EN

Also, if you review it here:
hidden link and switch to the EN version using the language switcher you will see that it's correctly connected to 2566

hidden link

Same with hidden link and hidden link

I created a sandbox for us to test this further.

You can login here:
hidden link

At the moment I have tried importing the Divi Layout into a test page but please notice that it is a bit off when exporting. Take a look and let me know if you can reproduce this behavior there.

March 12, 2023 at 12:27 pm #13225793

danieleB-5

Thanks. We need a couple of days to try this out.

March 13, 2023 at 10:19 pm #13237187

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

No problem, let me know your results when ready.