Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WPML Compatibility Bug When Languages Use Different Domain Names #750

Closed
VR51 opened this issue Apr 26, 2016 · 9 comments
Closed

WPML Compatibility Bug When Languages Use Different Domain Names #750

VR51 opened this issue Apr 26, 2016 · 9 comments

Comments

@VR51
Copy link

VR51 commented Apr 26, 2016

WPML allows admins to configure each language to use a URL that is either:

  1. a query string
  2. a virtual directory
  3. a different domain name

When the clear cache button is clicked in Comet Cache Pro all caches are cleared for URL formats 1 and 2 but format 3 (different domain name) remains unwiped.

I think the cache does clear itself automatically when it expires (not 100% sure) but the Clear Cache button doesn't do the job when different domains are used per language. Manual deletion of the cache directory does work (lol).

I've tried clearing the cache with the button while logged into the affected language version of the site (2 languages only). Doesn't make a difference. The secondary domain's cache doesn't clear.

As this happens with WPML it might also happen with multisites that use domain mapping. That'll need to be tested.

Thanks guys!

@raamdev
Copy link
Contributor

raamdev commented Apr 27, 2016

@VR51 Can you give me an example of what a "different domain name" would be? For example, if your primary domain is example.com are you able to tell WPML to use en.example.com? And how does that work anyway? Is WPML adding something to your .htaccess file to rewrite URLs?

The reason the cache for the other domain isn't getting cleared is that Comet Cache doesn't know about it. It just knows about the domain you have configured in the WordPress settings.

@VR51
Copy link
Author

VR51 commented Apr 28, 2016

Hi raamdev, I kinda guessed the cause would be something along those lines.

Not certain it needs to perform rewrites for the multi-domain name feature to work. Certainly makes no edits to .htaccess. I'll explain how the server and WPML are configured:

We have two domain names, one for each language:

  1. english-example.com
  2. spanish-example.com

They are not sub-domains. The hyphens are deliberate.

The server is configured to use spanish-example.com as the root domain. english-example.com is an addon domain. Both domains point to the same server space.

WPML has an option for setting a domain name to use for the alternate language versions of the site.

When a request is made to the server, WPML detects which domain is requested. WordPress serves the requested page. WPML detects whether an alternate language version of the page exists and if one does then WPML displays a link to the alternate language version. The WordPress admin pages are served under the primary domain name.

Here is the WPML official explanation: https://wpml.org/faq/server-setting-for-languages-in-different-domains/

Thank you for looking into this.

@raamdev
Copy link
Contributor

raamdev commented Apr 28, 2016

@VR51 Ah, thank you very much for that explanation and the great link to the WPML docs.

We actually have another issue open (see #608) specifically related to aliased domains and this issue with WPML clarifies the problem a bit more, so we should be able to get this fixed sooner rather than later.

I've copied relevant information from this GitHub issue over to the other one; see #608 (comment).

Note: If you're interested in testing a beta release of Comet Cache before the next version comes out, please sign-up to be a beta tester here or see Comet Cache → Plugin Updater → Beta Testers to automatically receive Release Candidate updates.

@VR51
Copy link
Author

VR51 commented Apr 28, 2016

Thank you Raam. Look forward to that update. Will register as a beta tester later today.

@raamdev
Copy link
Contributor

raamdev commented May 3, 2016

Referencing internal ticket: https://websharks.zendesk.com/agent/tickets/12400

@raamdev
Copy link
Contributor

raamdev commented Nov 15, 2016

Noting that Comet Cache v160706, which was released several months back, fixed the issue with aliased domains. I believe that resolves the issue described above with WPML. @VR51 Can you confirm?

@VR51
Copy link
Author

VR51 commented Nov 15, 2016

Yes and no. Mostly positive. This appears to be resolved but I had a customer approach me last week to say the bug had returned. I'm keeping my eye on it. The bug's revival could have been a temporary quirk. Thanks @raamdev

@raamdev
Copy link
Contributor

raamdev commented Nov 16, 2016

@VR51 Thanks for the update. I'll go ahead and close this issue for now then. If you confirm the issue is still there, I'll reopen this issue to investigate further.

@raamdev raamdev closed this as completed Nov 16, 2016
@VR51
Copy link
Author

VR51 commented Nov 16, 2016

Sounds good to me. Will keep you posted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants