Support » Plugin: WP Super Cache » WP Super Cache doesn’t offer CDN support for multiple domain WPML installations?

  • Hey there,

    we’ve chosen to use WP Super Cache, because it’s mentioned at the WPML compatibility list: https://wpml.org/de/plugin/wp-super-cache/ as WPMP-compatible.

    Our page has 3 language versions and 3 toplevel domains (.com for de-DE, .at for de-AT and .ch for de-CH) and every page has its own CDN drop zone url. (static….com for de-DE, static…..at for de-AT and static…..ch for de-CH).

    But – however – the Autoptimize CDN url is simply not being translated. It’s everytime pointing to .com-domain – even if you browse .ch or .at. That doesn’t make sense.

    After double-checking with the WPML as well as the Autoptimize support, they informed us, that this issue should be WP Super Cache related.

    So I’d really appreciate, if you could share your thoughts and perhaps find a solution.

    I’m really looking forward to hear from you.

    Best regards,
    mikey79

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Unfortunately changing the URL like this is not supported. I’ll add filters on the list of CDN URLs so that WPML changes them but that will require a modification of the WPML plugin too.

    Thread Starter mikey79

    (@mikey79)

    Hi Donncha,

    thank you very much for clarification!

    Could you describe the way of changes – so that I can realize them by myself?
    I could forward them to WPML as well …

    Best regards,
    mikey79

    In this patch I add a new filter called wpsc_cdn_urls:

    $ossdl_arr_of_cnames = apply_filters( 'wpsc_cdn_urls', $ossdl_arr_of_cnames );

    The variable $ossdl_arr_of_cnames is an array of the CDN URLs used by the search and replace code. I haven’t actually tested it or merged that code with the development version but if you point the WPML devs at that page I hope they’ll respond with some comments or feedback.

    Thread Starter mikey79

    (@mikey79)

    Hello Donncha,

    thanks a lot. I really appreciate.

    I just tried the patch, but unfortunately it doesn’t work. If I add the line to ossdl-cdn.php, the implementation of the autoptimize css-file changes to:

    .com: static…com (correct!)
    .at: www …at (not correct – should be static …. at)
    .ch: www …ch (not correct – should be static….ch)

    I will inform the WPML support concerning our conversation and your patch.
    I’ll keep you informed!

    Best regards,
    mikey79

    • This reply was modified 3 years, 10 months ago by mikey79.
    Thread Starter mikey79

    (@mikey79)

    ps. I’ve just informed WPML about this patch. I’ll post the solution here, as soon as it is found. 🙂

    Did you add code to change the URLs using the filter? You’ll have to change the www….at to static….at yourself. The filter just lets you modify those URLs.

    Thread Starter mikey79

    (@mikey79)

    No. I’m not that aware of the specific details.
    How can I change the http://www….at to static….at (or the http://www….ch to static….ch)?

    Best regards,
    mikey79

    Thread Starter mikey79

    (@mikey79)

    Hi again @donncha,

    the issue still exists.

    I’d really appreciate if you could explain, how to change the http://www….at to static….at (or the http://www….ch to static….ch)?

    Best regards,
    mikey79

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WP Super Cache doesn’t offer CDN support for multiple domain WPML installations?’ is closed to new replies.