• Resolved anton7249

    (@slieptsov)


    Hi,

    When Optimize JavaScript Code? option is off I get these Notices and Warnings:

    Notice: is_page was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in ../wp-includes/functions.php on line 5535

    Notice: is_single was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in ../wp-includes/functions.php on line 5535

    Warning: Cannot modify header information – headers already sent by (output started at ../wp-includes/functions.php:5535) in ../wp-includes/functions.php on line 6584

    Warning: Cannot modify header information – headers already sent by (output started at ../wp-includes/functions.php:5535) in ../wp-admin/includes/misc.php on line 1310

    Warning: Cannot modify header information – headers already sent by (output started at ../wp-includes/functions.php:5535) in ../wp-admin/admin-header.php on line 9`

    Can you please fix it?

    Kind regards

    • This topic was modified 3 years, 3 months ago by anton7249.
Viewing 6 replies - 16 through 21 (of 21 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, we might be getting somewhere; I can confirm I can trigger the notices if all optimizations (CSS, JS, HTML, Images, …) are off. You’ll agree that having AO active with all optimizations off is kind of an edge case, but I’ll look into it (I think I now know where in the code I’ll have to tweak things) ??

    Thread Starter anton7249

    (@slieptsov)

    Great to know you finally found it)

    Yes I am agree this is kind of an edge case, I just found it on my test site looks after auto-update of the plugin.

    By the way any chance you will make free version of Remove Unused CSS addon?)

    Kind regards

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    should be fixed on the beta branch, feel free to download it here to test ??

    By the way any chance you will make free version of Remove Unused CSS addon?)

    the problem is that unused CSS (like critical CSS) is generated by a 3rd party company using a node.js (and a headless browser) based SAAS model and that one cannot replicate the same logic in PHP (which is what AO is limited to), so no that is very unlikely I’m afraid.

    enjoy the weekend!
    frank

    Thread Starter anton7249

    (@slieptsov)

    Ok, do not understand why not parce HTML and CSS via php? Remove the unused classes, IDs, tags?

    What I have found so far https://github.com/momentum81/php-remove-unused-css

    Please take a look.

    What your thoughts?

    Kind regards

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    way to young, unfinished, unproven and looks abandoned, so chances of breaking sites if integrated in AO is too big in my opinion ??

    I had this issue too and can confirm that the change here appears to have fixed this.

    https://github.com/futtta/autoptimize/commit/27874774dcb776775872d1a2fa98d93fcc8859f6

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘Notice and Warning’ is closed to new replies.