Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
You are encountering an issue where some pages in the WordPress overview have an empty href attribute when WPML is enabled. This problem does not occur when WPML is disabled.

Solution:
The issue stems from the affected user not having a translator role in WPML's Translation Management. Here's how you can resolve it:
1. Add the affected user as a translator in WPML’s Translation Management to allow them access to the account page.
2. Consider the language hierarchy: if the original account page was created in Dutch with German as its translation, ensure that users needing access to the German version have translation permissions.
3. Optionally, recreate the account page in German (if that is the intended primary language) and then translate it into Dutch. This ensures that German-speaking users can access the page without needing additional permissions.

If this solution does not apply to your case, or if it seems outdated, we recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If issues persist, please open a new support ticket.

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.

Tagged: 

This topic contains 1 reply, has 1 voice.

Last updated by koenV-21 2 days, 18 hours ago.

Assisted by: Christopher Amirian.

Author Posts
March 4, 2025 at 11:28 am #16773309

koenV-21

Background of the issue:
I am trying to look at default WordPress overviews like wp-admin/edit.php?post_type=page. Some of the pages in these overviews have an empty href attribute. This bug happens for some users but not all. When I disable WPML, all links work correctly. I also scanned for Translate Link Targets but this didn't resolve the problem.

Symptoms:
Some pages in the WordPress overview have an empty href attribute. No issues found in the PHP Error log. Sometimes a link with empty href.

Questions:
Why do some pages have an empty href attribute in the overview?
How can I resolve the issue of empty href attributes when WPML is enabled?

March 4, 2025 at 12:16 pm #16773657

koenV-21

Extra information: all plugins are up to date on the test website, still the error occurred.

March 5, 2025 at 6:56 am #16776676

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Welcome to WPML support. Would you please provide the login information for the test site so we can check?

Also tell us which one to check that has the empty link.

We need your permission to deactivate/activate themes and plugins for investigation.

Please make sure you set the next reply as private.

March 6, 2025 at 12:38 pm #16783221

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Thank you for the login information. Unfortunately ,I could not find the section you talked about.

I created a video on what I see and I wonder if you can help[ me replicate the issue to be able to help:

hidden link

Thanks.

March 6, 2025 at 12:48 pm #16783290

koenV-21

Dear Christopher,

you logged in with the correct user but the error is in the backend:

hidden link

wpml-error.jpg
March 6, 2025 at 1:53 pm #16783764

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Thank you, I saw the issue, I tried to deactivate all plugins except WPML but now the website shows critical error.

Would you please enable the debug log to know what is the issue?

Would you please access your website files and edit the "wp-config.php" file on the root folder of your WordPress installation and add the code below into the file:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true );

Please add the code above the line below:

/* That's all, stop editing! Happy blogging. */

For more information:
https://wpml.org/documentation/support/debugging-wpml/

Thanks.

March 6, 2025 at 2:50 pm #16784115

koenV-21

I changed the theme (which caused the critical error as it requires Gravity Forms to be installed) and added your debug constants.

March 7, 2025 at 1:15 pm #16788510

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

I have found the reason why the user encountered the issue. I explained the details here:

hidden link

Summary of Video: Resolving Account Page Access Issue in WPML
The issue with the account page not working for a specific user was identified as a missing translator role in WPML. The key points of the solution are:

Missing Translator Role: The affected user was not listed as a translator in WPML’s Translation Management section. After adding them as a translator, they were able to access the account page.
Language Hierarchy Impact: The original account page was created in Dutch, with German as its translation. Because of this, users without translation permissions cannot access the translated page.
Why Some Users Don’t Face This Issue: Some users automatically receive translation privileges, allowing them to access both versions without issues.
Two Solutions:
Grant the user translator permissions in WPML’s Translation Management to allow access to both Dutch and German versions.
Recreate the account page in German (if that is the intended primary language) and then translate it into Dutch to ensure access for German-speaking users.
Access Behavior Based on Language: If the account page remains originally in Dutch, users without translator roles can only access the Dutch version, not the German one.
Following these steps will ensure users have the correct access depending on their language settings and permissions.

March 7, 2025 at 1:42 pm #16788847

koenV-21

Thanks for finding this. I would have never found this. I do think WPML is outgrowing what I use it for. So many settings, roles etc that make it hard to work with....

Really thankful you found a solution. Thank you.