• Resolved willjames

    (@willjames)


    Hi, I am getting the following warning message in the server logs. Doesn’t happen all the time, it is usually caused by bots going where nobody else does. However they do it a lot at ones and it seems to cause CPU spikes.
    This is one example: https://www.truckpages.co.uk/seller/emirsanexport1gmail-com/ I am getting no errors in the console when inspecting in Chrome tools.

    I am using AO 3.0.0-beta-4 plus Rapidload and CCSS (all up to date)

    Thanks in advance

    AH01071: Got error ‘PHP message: PHP Warning: Illegal string offset ‘file’ in /var/www/vhosts/domainname.co.uk/httpdocs/wp-content/plugins/autoptimize-beta/classes/autoptimizeCriticalCSSCore.php on line 112PHP message: PHP Warning: Illegal string offset ‘file’ in /var/www/vhosts/domainname.co.uk/httpdocs/wp-content/plugins/autoptimize-beta/classes/autoptimizeCriticalCSSCore.php on line 112PHP message: PHP Warning: Illegal string offset ‘hash’ in /var/www/vhosts/domainname.co.uk/httpdocs/wp-content/plugins/autoptimize-beta/classes/autoptimizeCriticalCSSEnqueue.php on line 119PHP message: PHP Warning: Illegal string offset ‘hash’ in /var/www/vhosts/domainname.co.uk/httpdocs/wp-content/plugins/autoptimize-beta/classes/autoptimizeCriticalCSSEnqueue.php on line 144PHP message: PHP Warning: Illegal string offset ‘file’ in /var/www/vhosts/domainname.co.uk/httpdocs/wp-content/plugins/autoptimize-beta/classes/autoptimizeCriticalCSSEnqueue.php on line 144′

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

Viewing 5 replies - 16 through 20 (of 20 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    both criticalcss.com and rapidload are external services which I like very much, so whatever works for you ??

    Thread Starter willjames

    (@willjames)

    The RL Critical CSS did not work – it overloaded the cpu and made the site keep timing out. I have reached out to them.
    It seems that my site setup means that I have to aggregate the css files otherwise it does not work. Without this I get security messages as fonts are attempted to be downloaded from the cdn without the https.
    I have learnt that to make a change and test all of this is massively challenging and over complex. The set up appears to be OK now, but if I make a small change I end up chasing my tail each time. I end up running loads of processes that are probably not necessary but slow up the site in the meantime. I could therefore use some help that I think would make a good article for your blog and help us all out…. (unless it already exists and I haven’t found it yet)

    Process for updating caches with:
    ? Autoptimize
    ? Critical CSS
    ? Rapidload
    ? WP Super Cache (or similar)
    Apologies for reaching out here, but I have been really struggling in the testing of changes.
    I think that an overview of the following would be really useful (some kind of flow chart) as I never know the best way to run this lot. Unfortunately, I think you must be best placed to advise here are as RL & CCSS hang off your AO plugin.
    I understand that RL uses the rule based jobs, so takes a while to run throughout the site. If WPSC runs before this is finished, then we are caching pages with full css rather than reduced css so even when the RL jobs are complete
    ? RL can only run when the AO cache is up to date?
    ? CCSS doesn’t need to run as it takes the CSS related to the files that have been set up (auto or manual)
    ? CCSS seems to give odd results, especially if there is a WPSC cached page or if the page is grabbing a rule that it shouldn’t when you are running it manually (for example on my CPT product page it will take the CPT ‘listings’’, or WP ‘single’ so I need to delete these before I run a manual CCSS job.)
    If I started with no cache built, for example – should I do the following:
    1. Let AO css files build. (How long does this take – are they built on user visit/spidered/taken from sitemap?)
    2. Let RL jobs run (do I wait for 1 above to complete and how do I know if it has?)
    3. CCSS does not always show the correct css on auto rules (see note above) so I have to create manual ones. Do I do this after RL has run or should it be independent?
    4. Check a few pages then preload WPSC cache?
    If the above is correct, what happens if I clear the AO cache? What else does it clear? I know it clears the WPSC cache, what about RL? if it does and is RL looking for AO CSS files that don’t exist?

    Any help on this would be greatly appreciated.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Afraid I’m not able to answer all your questions, esp. as I don’t know RL in detail (but they do and they give pretty great support so I’m pretty sure they’ll be able to help), but generally indeed page caching (WPSC or other) means that ongoing improvements (critical css/ rapidload rules) are not visible until the page cache for impacted pages is cleared. But given most page caches come with a pre-set cache lifetime, pages automatically expire at which point the page will be re-cached, this time including the rapidload/ critical CSS.

    In that context my advice would be to:
    * have page caching active at all times
    * create manual page rules

    Some specific answers:
    1. critical CSS rules are created from the job queue which is processed every 10 minutes. the job queue is filled based on user interaction (pages being requested by visitors)
    3. I would create manual rules first and foremost and then clear the page cache so they are active asap (I don’t think this interacts/ interferes with RL)
    4. clearing WPSC’s full cache or AO cache clears the other and also clears RL’s rules if I’m not mistaking but not the critical CSS rules, so avoid clearing the full page cache (or AO’s cache).

    hope this helps,
    frank

    Thread Starter willjames

    (@willjames)

    Thanks for the info – a little clearer. I have the Rapidload team looking at my dev site now. Hopefully they can get it working OK.

    I just have to fix the last remaining “Does not use passive listeners to improve scrolling performance” but I can’t find the cause – nowhere in the code that I can see is any kind of event listener… It seems to call out the Ontouchstart=”” in the body class but I can’t think why – or what else it could be!

    Cheers!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, your <body node has an ontouchstart attribute, you’ll have to find out how that got there (i.e. if your theme or a plugin added it).

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘php illegal string offset warning in logs’ is closed to new replies.