Quantcast
Channel: WordPress.org Forums » [W3 Total Cache] Support
Viewing all articles
Browse latest Browse all 19378

james@imajery.com on "[Plugin: W3 Total Cache] Bug with w3tc cdn urls when using wpml"

$
0
0

CDN urls produced by W3TC when using WPML are incorrect for non-default languages.

Effectively the localized home url is appended to the cdn url:
http://cdn.domain.comhttp://www.domain.com/path/to/resource

This occurs in /inc/define.php, w3_filename_to_url(). The problem is solved by replacing the call to w3_get_home_url() with w3_get_site_url() on line 134, i.e. using the non-localized site url instead of the localized home url. This fix assumes that resources are not localized via their url formats, which is how I have observed WPML to work.

It would be great to see this fix, if approved, in one of the next releases so I can easily update. Thanks!

http://wordpress.org/plugins/w3-total-cache/


Viewing all articles
Browse latest Browse all 19378

Trending Articles