• Resolved bluelightwave

    (@bluelightwave)


    what settings should be done when using DIVI and autoptimze together?

    i was having issues with displaying google fonts in one of my sites, but then unticked ‘also optimize for logged users’ and it worked. But then this didn’t work in my other site, so I had to disable ‘static css file generation’ on divi, and ticked ‘force javascript in <head>’ on autoptimze to work for a while, but then it didn’t??! I have just disabled autoptimize for now, and all shows up.

    Are there any docs or chats where I can look into for the settings when these two work conjunction??

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

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    There’s not generic Divi+AO doc, as configuration depends not only on theme but also on theme config, plugins & plugin config really (which explains why working config on one of your sites did not work on anohter).

    Given disabling “static CSS file generation” helped, I would go from there. Regarding JS issues; what broke & when? What JS errors were visible on the browser console?

    Thread Starter bluelightwave

    (@bluelightwave)

    I am back working on this issue, and not sure where to go now… how would i go about seeing JS errors in browser console?
    For now I have disable autoptimze, since this is the only way my webpage displays as it should…but would like to install autoptimize for all the benefits it has 😉

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    have a look at https://ww.wp.xz.cn/support/article/using-your-browser-to-diagnose-javascript-errors/#step-3-diagnosis re. JS errors

    re. disabling AO; you can always activate the features that don’t break your site (HTML optimization, CSS optimization?, Google Fonts, Images, …)?

    frank

    Thread Starter bluelightwave

    (@bluelightwave)

    So I disable aggragate JS-files and page displays now as it should…

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, that’s a good start! so when JS aggregation is on, what errors do you see on the browser console?

    Thread Starter bluelightwave

    (@bluelightwave)

    SyntaxError: missing } after try block autoptimize_6149df3f2a1f6738f16d8d5c2cfa1411.js:1084:2411
    uncaught exception: TagError: adsbygoogle.push() error: Only one ‘enable_page_level_ads’ allowed per page.

    Thread Starter bluelightwave

    (@bluelightwave)

    and when I disable i get this:
    ReferenceError: wp is not defined autoptimize_single_81f5cbe986afdc84c8480d9a27ae9b2d.js:1:161688
    <anonymous> https://food4youngathletes.com/wp-content/cache/autoptimize/js/autoptimize_single_81f5cbe986afdc84c8480d9a27ae9b2d.js:1

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, can you;
    * disable JS try/catch wrapping
    * add /plugins/wp-ultimate-recipe/ (which is responsible for that wp is not defined error) to the comma-separated JS optimization exclusion list
    * disable the minification of non-aggregated (excluded) files

    And then check what JS errors are visible (you’ll still see the wp is not defined one, but that’s something AO can’t fix)?

    Thread Starter bluelightwave

    (@bluelightwave)

    so I enable aggregate js-files to be able to disable js try/catch wrapping. Added the /plugins/wp-ultimate-recipe/ to list and unticked ‘minify excluded css and Js files’
    and got the following errors, and page goes back to displaying with blank areas…

    JQMIGRATE: Migrate is installed, version 1.4.1 autoptimize_e210ce4e1046bec374ee2a0a0e9a4d6c.js:2:552
    TypeError: document.body is null autoptimize_e210ce4e1046bec374ee2a0a0e9a4d6c.js:271:50
    <anonymous> https://food4youngathletes.com/wp-content/cache/autoptimize/js/autoptimize_e210ce4e1046bec374ee2a0a0e9a4d6c.js:271
    <anonymous> https://food4youngathletes.com/wp-content/cache/autoptimize/js/autoptimize_e210ce4e1046bec374ee2a0a0e9a4d6c.js:271
    uncaught exception: TagError: adsbygoogle.push() error: Only one ‘enable_page_level_ads’ allowed per page.
    ReferenceError: wp is not defined wpurp-public.js:1:161688
    <anonymous> https://food4youngathletes.com/wp-content/plugins/wp-ultimate-recipe/assets/wpurp-public.js:1

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, so document.body is used in multiple JS-files, so not _very_ straightforward, but you would have to try to exclude these one by one to see which one causes the error;

    for the “adsbygoogle”-error you’ll have to untick “also aggregate inline JS” or add adsbygoogle to the JS optimization exclusion list.

    frank

    Thread Starter bluelightwave

    (@bluelightwave)

    I have excluded /plugins/wp-ultimate-recipe/,adsbygoogle,/themes/Extra/includes/builder/scripts/frontend-builder-scripts.js,

    I noticed that another of pages was not displaying correctly so I excluded the following and it fixed this specific problem on the page – /wp-content/plugins/wp-ultimate-recipe/assets/wpurp-public.js

    Unticked aggregate js-files

    seems to be working better now

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    If you can make it work with “aggregate JS files” on and “aggregate inline JS” off, that would be better though (from a page rendering performance point of view).

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘DIVI THEME and AUTOPTIMIZE’ is closed to new replies.