Skip to content

Issue with using the domain per language setting in WPML when Dokan WPML is activated #112

@sazz-pranto

Description

@sazz-pranto

Description:
When using Dokan with WPML configured in different domains per language mode, the language switcher may generate invalid URLs containing an extra domain prefix. I tested this locally and found that the issue is there.

Screenshots:
Broken URL: https://d.pr/i/SV1CzU
WPML configuration: https://d.pr/i/p5KAfL

Steps to reproduce:

  1. Go to WP admin > WPML > Languages > Language URL format
  2. Choose the option "A different domain per language" and hit save.
  3. Go to the site's home page and try switching to another language. Observe the switcher link. Disabling the Dokan WPML plugin fixes the issue immediately.

Expected behaviour:
The switcher link should correspond to the setting instead of breaking the URL when Dokan WPML is enabled.

Other information:

  1. Related discussion: https://wpml.org/fr/forums/topic/url-casse/
  2. Workaround suggested by the WPML support team: https://wpml.org/errata/dokan-the-language-switcher-generates-malformed-urls-when-using-different-domains-per-language/
    I tested the fix in my local environment, and it appears to be working as expected.

CC: @jamil-mahmud bhai

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions