• Resolved technicalx

    (@technicalx)


    Hi, I have inline CSS not working. It is still loading files. My website is a subdirectory like sub.example.com/projects/wordpress/

    my settings
    {"module_caching":"1","caching_expiry":100,"caching_separate_mobile":"","caching_warmup_after_clear":"0","caching_exclude_urls":"","caching_include_query_strings":"utm_source","cdn_url":"","cdn_includes":"","cdn_excludes":"","cloudflare_enable":"","cloudflare_api":"","cloudflare_email":"","cloudflare_zone":"","cf_rocket_loader_enable":"","cf_dev_mode_enable":"","cf_css_minify_enable":"","cf_html_minify_enable":"","cf_js_minify_enable":"","cf_browser_cache_ttl":"0","sucuri_enable":"","sucuri_api":"","sucuri_secret":"","module_css":"1","enable_criticalcss":"0","criticalcss_default":"","criticalcss_codes":{"is_front_page":"","is_home":"","is_single":"","is_page":"","is_category":"","is_tag":"","is_archive":""},"remove_criticalcss":"1","css_inline":"1","css_minify":"1","css_exclude":"","module_assets":"1","minify_html":"1","optimize_gfonts":"1","lazyload":"0","lazyload_exclude":"","js_optimize":"defer","js_exclude":"js\/jquery\/jquery.js","preboost":{"preboost_enable":"","preboost_include":""},"module_special":"1","localize_tracking_scripts":"","custom_codes":"","jetpack_dequeue_devicepx":"","woocommerce_disable_cart_fragments":"","woocommerce_optimize_nonwc_pages":"","woocommerce_disable_password_meter":"","pagespeed_tricker":"","module_tweaks":"1","instant_page":"","trim_query_strings":"","disable_self_pingbacks":"1","dequeue_emoji_scripts":"1","disable_post_embeds":"","dequeue_dashicons":"1","dequeue_block_library":"","heartbeat_settings":"enabled","post_revisions":99,"autosave_interval":1,"declutter_head":{"declutter_shortlinks":"","declutter_adjacent_posts_links":"","declutter_wlw":"","declutter_rsd":"","declutter_rest_api_links":"","declutter_feed_links":"","declutter_wp_version":""},"backup":"","enable_external_notices":"1"}

    2021 theme
    active plugins
    Better Search Replace Version 1.3.4 by Delicious Brains | Auto-updates disabled
    Child Theme Configurator Version 2.5.6 by Lilaea Media | Auto-updates enabled
    Disable Comments Version 2.0.2 by WPDeveloper | Auto-updates enabled
    Enable Media Replace Version 3.5.0 by ShortPixel | Auto-updates enabled
    InfiniteWP – Client Version 1.9.4.8.2 by Revmakx | Auto-updates enabled
    Limit Login Attempts Reloaded Version 2.19.1 by Limit Login Attempts Reloaded | Auto-updates enabled
    Regenerate Thumbnails Version 3.1.4 by Alex Mills (Viper007Bond) | Auto-updates enabled
    Simple History Version 2.38.0 by P?r Thernstr?m | Auto-updates enabled
    Speed Booster Pack Version 4.1.0 by Optimocha | Auto-updates disabled
    Yoast Duplicate Post Version 4.0.2 by Enrico Battocchi & Team Yoast | Auto-updates enabled

    • This topic was modified 3 years, 10 months ago by technicalx.
Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Optimocha

    (@optimocha)

    @technicalx can you send me the website address?

    Not sure if you ever got this figured out, but I was the one that posted the original “Inline All CSS Feature not working after 4.1.0 update”. After talking with the optimocha dev, we found out that the features worked if I disabled my SEO plugin. so we assumed it was just the SEO plugin causing issues. However, I later realized that with the default 2021 theme and that same SEO plugin, the speed booster features were working. So I dug through 2021’s functions file to find what was allowing speed booster to work on 2021, but not my theme. After going line by line I found the one simple line that fixes the problem. Just add this to your themes functions file and speed booster should work.

    add_theme_support( 'title-tag' );

    Thread Starter technicalx

    (@technicalx)

    Doesn’t fix it, I have no other plugins installed.
    Same problem in 2015 template too.
    my only non-standard setup is having websites in subdirectories

    Only error I get is this
    Trying to access array offset on value of type null in =/home/dev/public_html/network/wordpress_test2021/wp-content/plugins/speed-booster-pack/includes/classes/class-sbp-cloudflare.php= on line 115

    Ah. I’m not using any of the CDN settings, so I have not encountered this issue. If you disable the CDN features does it work?

    Thread Starter technicalx

    (@technicalx)

    I just tried Reset, Caching On, Inline All, Minify Inlined on 2020 theme and doesn’t work. No CDN.

    actually just noticed another bug, that Inline All enabled changes the Title tag encoding to unencoded.

    Website Title with Inline All disabled
    empty &_amp; 2021 &_#8211; essential plugins
    website title after Inline All enabled (which is wrong)
    empty & 2021 – essential plugins

    edit: can’t show proper entities here so ignore the underscore.

    • This reply was modified 3 years, 9 months ago by technicalx.
    • This reply was modified 3 years, 9 months ago by technicalx.
    • This reply was modified 3 years, 9 months ago by technicalx.
    • This reply was modified 3 years, 9 months ago by technicalx.
    • This reply was modified 3 years, 9 months ago by technicalx.
    Thread Starter technicalx

    (@technicalx)

    I just installed a fresh WordPress (AU version) in a subdirectory, new database utf8mb4_unicode_ci, Speed Booster plugin, Permalinks on, caching on, inline on – doesn’t inline.

    • This reply was modified 3 years, 9 months ago by technicalx.
    • This reply was modified 3 years, 9 months ago by technicalx.
    Plugin Author Optimocha

    (@optimocha)

    @technicalx can you install the Autoptimize plugin and enable the “Inline all CSS” option, and see whether or not it works? I can’t log in with the credentials you provided anymore.

    Thread Starter technicalx

    (@technicalx)

    Now using 4.1.1 speed booster pack.

    Yes autoptimize Inline All CSS works.

    In speed booster pack 4.1.1
    Title tag encoding is also messing with other titles in page too, so entities in both <title> and <h1> site title and <h2> page titles etc are all being decoded to plain characters when the plugin has Inline CSS enabled – but NOT when that part is disabled.
    I’m not sure if that is related to the Inline CSS failing, but it’s not good.

    Plugin Author Optimocha

    (@optimocha)

    Hi @technicalx,

    Can you navigate to line 223 in the file /speed-booster-pack/vendor/simplehtmldom/simplehtmldom/HtmlDocument.php and and change that line from this:

    $this->decode();

    to this:

    // $this->decode();

    And tell me if anything good happens? It will fix the decoding issue but I’m wondering if it will fix CSS inlining as well.

    • This reply was modified 3 years, 9 months ago by Optimocha.
    Thread Starter technicalx

    (@technicalx)

    That fixes the characters but still no inline CSS.

    Also wondering why JS Defer for inline JS is base64 ? base64 is bigger in all my inline JS by about 30% which is close to what they say about base64 conversion.
    includes\classes\class-sbp-js-optimizer.php line 183 should probably just disable this until there’s a toggle flag to enable it and a strategy to remove whitespace from JS would be better but that’s always risky and might as well leave it to autoptimize.

    • This reply was modified 3 years, 9 months ago by technicalx.
    • This reply was modified 3 years, 9 months ago by technicalx.
    • This reply was modified 3 years, 9 months ago by technicalx.
    • This reply was modified 3 years, 9 months ago by technicalx.
    Plugin Author Optimocha

    (@optimocha)

    @technicalx that behavior of encoding inline JS has to be done in order to prevent screwing up JS execution order; otherwise inline JS can’t be deferred with the defer parameter and JS files load & execute after inline JS, causing all sorts of JS errors. I highly recommend you don’t comment out that line (183) because you’ll most likely break your JS.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Inline All CSS Feature not working after 4.1.0 update (v2)’ is closed to new replies.