• Hi Frank,

    You probably remember me from a million and one support threads under autoptimize. To show my appreciation for your great support, I have signed up for various things through your affiliate links in the optimize more section of autoptimize.

    Unfortunately, I am having difficulty getting critical CSS to work as desired. So far I have identified two issues that I can’t get round.

    1. The homepage is getting messed up in various places when critical css is created for it. White space sometimes appears. Some photos in the slider just under the main banner shrink, and the instagram feed we have at the bottom of the page gets messed up. I have set manual rules for “is_front_page” with none written in the css field and path / with none in the css field. However, this rule is overridden every few minutes by the automatic work queue. The way I have found to fix it is by deleting the entry on the criticalcss page, but again, it just appears again soon after.

    2. There are product sliders on various pages that seem to get messed up. (The products get squashed together with a big white space below them). How can I exclude them from the process? (I guess the same question goes for the affected stuff on the homepage). An example of the slider in question appears just under the words “Top Experiences in Bali:” on the page https://southeastasiabackpacker.com/destinations/indonesia/bali/

    I’ll be turning the plugin off while I’m away from my computer, in case you look and find it’s not running, but I’ll turn it back on again when I’m around to keep an eye on things.

    Thanks in advance for your help!

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

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

    (@optimizingmatters)

    hey Dave:-)

    If you want a rule for which no critical CSS is to be injected, you can add none in the critical CSS field. if you leave the field empty, this is considered a “to be submitted” request for automatic critical CSS creation.

    That being said, the issues you describe _should_ be fixable by some (advanced) configuration. If you can re-enable the plugin I’ll have a look to see how ??

    have a nice Sunday!

    Thread Starter davenoakes

    (@davenoakes)

    Hi!

    Thanks for your response

    I have successfully got none to work for random posts and pages, but not on the homepage. I have added rules for is_front_page none and is_home none, but the only way I have managed to get it not to update is to add path / none. Unfortunately, that has stopped the critical css being applied to any page!

    I will remove the path / none rule now, so that you can see the effects. I’ll probably have to take it off again within the hour though, if I have to do that, I’ll update you when I’m back at my computer and have let the plugin run again.

    Have a nice Sunday too!

    Thread Starter davenoakes

    (@davenoakes)

    Very oddly, I have removed all three of the rules I mentioned above but the critical css still isn’t being applied. New code is being generated on criticalcss.com, with the API symbol present, but when I look at the pages, they are loading as normal.

    Thread Starter davenoakes

    (@davenoakes)

    It seems as soon as I pressed enter on that comment, some magical cache was cleared somewhere and now it definitely is being applied

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    this is what I see on the homepage, not sure what I should be looking for though, can you tell me what is wrong?

    regarding none-rules (apparently I hadn’t properly read your original post); so these do get updated for the front-page and that way do result in critical CSS after all?

    Thread Starter davenoakes

    (@davenoakes)

    I’m getting the instagram block at the bottom messed up, I tried to add a screenshot, but I wasn’t able to find how to do that. If you clear browser cache and try again does it still look normal?

    Yes, the rules for front-page seem to get overridden. I have taken all of those rules out at the moment

    Thread Starter davenoakes

    (@davenoakes)

    We’re just going out, so I have to turn it off again for a bit. I’ll add another message when we get back and turn it on again.

    Thanks for your help!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I’ve been able to reproduce a messed up instagram block once, but as soon as I scrolled it got repainted correctly (it seems JS based and the size of the images is set by JS and scrolling seems to re-trigger this mechanism). what might be worth investigating is excluding that JS from AO JS optimization?

    Thread Starter davenoakes

    (@davenoakes)

    I’m not sure what JS I could exclude for that block. It links up to a 3rd party website to get the images. There’s nothing I can see in the source code with .js in it, or any internal folder that seems to manage it. I’m sure this is because I’m not very good at looking for these things…

    The other places things are going wrong are in sliders. There is a slider with photos in it on the homepage, just right of where it says “The Story of South East Asia Backpacker Magazine!”. This also tends to get messed up when critical css is running. Then there are the product sliders as described in my first post on this thread with the example of the bali page. These sliders are created using the theme’s own shortcode.

    The image block on products themselves also gets messed up, but I have currently disabled critical css on all product pages using a wildcard on a rule (as far as I can tell, this is working OK).

    I’m going to turn critical css back on now and see if I can get anywhere.
    I’m

    Thread Starter davenoakes

    (@davenoakes)

    It turns out my wildcard didn’t work. Worryingly, all the rules I’d set before have disappeared. I’d set /basket/ none, for instance, but now the rule has gone from the list and has appeared again in the work queue.

    I’m turning it off again for now. Please, let me know if there’s a good time to turn it on again for you to have a look at it.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    might be better to work on a staging site to get this sorted out, do you have one Dave?

    Thread Starter davenoakes

    (@davenoakes)

    I haven’t at the moment, but I’ve just contacted my host to ask them to set one up on a subdomain for me. I’m just waiting to hear back from them.

    Normally I would have maintenance mode running on a staging site. This won’t be possible in this case, right? Otherwise, citicalcss won’t be able to access what it needs to. Or could there be some way around that? If not, I’m guessing I should add noindex to robots.txt, and then everything will be OK anyway…

    Also, do I need to contact CriticalCSS directly to ask for them to set up the subdomain API (I’m guessing they’ll let me do that for free if it’s only for a few days, for testing reasons)? Or are you one and the same?

    Thanks again for your help!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    -> criticalcss indeed needs access, but if your maintenance plugin allows to whitelist IP’s we could to that?
    -> subdomain + robots.txt should work. additionally you could maybe find some plugin to add “canonical” meta-tags pointing to your main site “just in case”?
    -> criticalcss & optimizingmatters are not one and the same, but feel free to contact Jonas with me in CC, I will confirm Jonas we’re troubleshooting here (he’ll be happy to assist I’m sure).

    frank

    Thread Starter davenoakes

    (@davenoakes)

    Hi Frank,

    Thanks as always for your help. I’m hoping the staging site will be up and running later today. I will check out the maintenance plugin’s options and use the whitelist function if it has one. Otherwise, your other suggestion sounds very robust.

    I’ve written to Jonas just now.

    Hopefully everything will be set up soon

    Thanks again!

    Thread Starter davenoakes

    (@davenoakes)

    Hi Frank,

    OK, I’ve got the staging site running criticalcss. The list is still growing, but there’s plenty that’s turned up already. Here’s a list of issues I’ve come across so far…

    Homepage – dev.southeastasiabackpacker.com – Photo slider to the right of “The Story of South East Asia Backpacker Magazine!” not working properly, big white space underneath. Instagram feed at the bottom not working properly, another big white space underneath.

    Product sliders on multiple pages – messed up + big white space. See example on https://dev.southeastasiabackpacker.com/activities/scuba-diving/ – find “Discover Scuba Diving – Latest Offers…”

    Post sliders on multiple pages – same problem – see example below the pin image (scroll down) on – https://dev.southeastasiabackpacker.com/destinations/cambodia/#ftoc-heading-16

    It’s worth noting that I cannot successfully check the Optimise JavaScript Code? box in AO without a lot of errors appearing these days. When it’s checked, the ?ao_noptimize=1 command doesn’t work. On the live site I have WP Rocket optimizing JS instead. I have searched for the code that shows in the error message on the staging site (AO JS optimization enabled) with the ?nocache version on the live site. The errors seem to relate to scripts that are already in the AO exclude JS scripts list. The errors appear whether I clear the contents of that list, or not.

    It’s very strange…

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Issues I can’t get round’ is closed to new replies.