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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: Asia/Singapore (GMT+08:00)

Tagged: 

This topic contains 19 replies, has 2 voices.

Last updated by beatS-3 11 months ago.

Assisted by: Kor.

Author Posts
September 27, 2023 at 8:29 pm #14477343

beatS-3

I'm using a block theme, and I manage to translate the menu including URLs, templates and template parts.

But now I noticed that the current menu item is not highlighted in the secondary language.

Investing the markup I saw that the "current-menu-item" CSS class is missing in the secondary language.

What can I do about that?

September 29, 2023 at 2:25 pm #14488075

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Hi there,

Thanks for contacting WPML support.

Could you share your Website URL here in question so that I could take a look at it? Also, please highlight it using a screenshot about the issue that you're referring to.

Upon reviewing your debug information, I have observed that the PHP limit for your "WP Memory Limit" is lower than the recommended 256MB or the required 128MB, as mentioned in the documentation found at: https://wpml.org/home/minimum-requirements/. To resolve this, I kindly request that you contact your hosting provider and request an increase in the PHP value for you.

October 2, 2023 at 6:57 am #14494777

beatS-3

Dear Kor,

Thanks for your feedback. I will send you the link ASAP, and will increase the memory limit.

The site is just about to go live and I temporarily fixed it using JS.

Get back to you soon!

October 2, 2023 at 7:50 am #14495061

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Sure thing. Please let me know how it goes.

October 5, 2023 at 9:35 am #14518897

beatS-3

Dear Kor,

I just cloned the site onto my server and deactivated the JS hack:

hidden link

In this case, the "About us" link should have the class "current-menu-item" in be coloured red, just like on the German page:

hidden link

But the classes are not loaded in the secondary language.

Appreciate your help, and let me know if you need admin access!

October 6, 2023 at 6:02 am #14524071

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

This is more like an issue with your theme. But anyway, I'd like to take a look at the backend. Therefore, I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified.

Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.

Your upcoming reply will be treated with confidentiality and will only be visible to you and me.

✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.

Upon reviewing your debug information, I have observed that the PHP limit for your "WP Memory Limit" is lower than the recommended 256MB or the required 128MB, as mentioned in the documentation found at: https://wpml.org/home/minimum-requirements/. To resolve this, I kindly request that you contact your hosting provider and request an increase in the PHP value for you.

October 6, 2023 at 1:04 pm #14528281

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

I've checked and it looks like we have a similar case here https://wpml.org/forums/topic/split-twenty-twenty-two-theme-navigation-current-item/#post-11529987 . Could you try applying the JS code to your Website and see if it works for you?

October 6, 2023 at 6:11 pm #14530687

beatS-3

Thanks for looking into it.

I have my own JS fix, but this is not satisfying. I mean: All information should be there for it to render on page load. I don't see a point why in 2023 I need JS to fix this.

I'm using the native WP "navigation block" that has been around for a while, and I really hope that the WPML tech team will seriously look into it.

If there's an open ticket somewhere I'd love to be updated.

Best wishes!

October 9, 2023 at 10:08 am #14538189

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

I will need to escalate this to our 2nd Tier Support and we kindly request a site snapshot. Alternatively, with your permission, we can create a snapshot on our own.

For this purpose, we typically recommend using the free plugin "Duplicator." If you are already familiar with how Duplicator works ( https://wordpress.org/plugins/duplicator/), please skip the following steps and simply send me the archive file you downloaded.

To assist you further, please follow these instructions:
Watch the Duplicator instructions video: hidden link

Refer to the instructions provided by WPML on how to provide supporters a copy of your site: https://wpml.org/faq/provide-supporters-copy-site/

If the archive file exceeds 400MB in size, please utilize Duplicator's file filters to exclude the cache, wp-uploads directory, media, and archive files.

Once you have the archive file, please share the link with us. You can use services such as Google Drive, Dropbox, or similar platforms as the snapshot file will likely be large.

Please note that your next reply will be private, visible only to you and me. You can paste the link to the file there. Rest assured that once the issue is resolved, I will delete the local site.

October 16, 2023 at 8:02 pm #14588695

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thank you for getting back to me.

I've successfully copied your package to our local development site, and I'll now proceed with a thorough investigation. I'll provide you with an update as soon as possible!

October 18, 2023 at 4:59 pm #14607211

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thank you for your understanding.

I will now escalate this matter to our 2nd Tier Support team for a more in-depth investigation. I'll keep you updated once I receive feedback from them. Your patience is greatly appreciated.

October 24, 2023 at 7:00 pm #14650475

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thank you for your understanding.

I've received feedback from our 2nd Tier Support, and it appears that additional testing is required. I will keep you informed as soon as I have further updates on this matter.

October 26, 2023 at 6:49 pm #14673733

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

I appreciate your patience.

Would you be able to recreate the problem on our sandbox site located at this link:
hidden link

I've attempted to reproduce the issue myself, but I'm uncertain about what I might have overlooked. I apologize for the trouble and the inconvenience.

October 28, 2023 at 8:13 am #14682913

beatS-3

Dear Kor, thanks for your efforts.

While reproducing the case, I think I stumbled upon the issue that WPML has:

- Menu items displayed through the "Page List" block work as expected: Active class is set and URLs are translated automatically, in both the main and secondary language.

- Menu items added as a "Page Link" block (as a direct child of the "Navigation" block) do not get the active class in the secondary language, and URLs need to be translated manually.

The same issue can be reproduced with the "Twenty Twenty Three" theme.

Thanks for your feedback!

Screenshot 2023-10-28 at 10.03.45.jpg
October 30, 2023 at 10:20 am #14689885

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for replicating the issue.

I've forwarded this to our 2nd Tier Support for further investigation.