• Resolved Wonderm00n

    (@wonderm00n)


    Hi there,

    Just installed Autoptimize on a WPML + WooCommerce website and configured everything as I want (already used Autoptimize before on websites with/without WPML) and it is only aggregating CSS and JS files for the main website language (English) but not on Portuguese.

    The HTML is being optimized on both languages.

    Inline Javascript is the only thing being added to the autoptimize aggregate js file in Portuguese.

    I cannot provide the website URL here because it is still in development and it’s password protected, but I can provide it by email.

    https://www.ads-software.com/plugins/autoptimize/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Frank Goossens

    (@futtta)

    Afternoon wonderm00n;
    sounds like a problem with the domain of the portuguese site not matching the domain used to fetch the CSS/ JS, in which case AO doesn’t aggregate.

    but feel free to mail me at futtta-at-gmail-dot-com and i’ll have a quick look.

    kind regards,
    frank

    Thread Starter Wonderm00n

    (@wonderm00n)

    After the debug made by Frank and I via email, we got to this conclusion:

    This was a problem with content_url() returning the main language domain and not the portuguese one.

    I fixed it with this on my theme’s functions.php:
    define(‘AUTOPTIMIZE_WP_CONTENT_URL’, site_url().’/wp-content’);

    This however assumes the content folder is always “wp-content”. On my website it will not be a problem.

    Hello there,
    A million thanks to you wonderm00n.
    I’ve been facing the same issue for months and months, looking for THE answer: how to make Autoptimize aggregating css and js on a multilingual site with virtual multi-domain (.fr and .com), one per language, and one only physical wordpress install.
    And wonderm00n, you’v done it!
    Kind regards
    Gilles

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problems with WPML – Just one language being optimized’ is closed to new replies.