Support » Plugin: WP Scripts & Styles Optimizer » Conditions not working

  • Resolved joycegrace

    (@joycegrace)


    Hi there, any conditions I try to set up for any script or style doesn’t apply after saving. I’ve been clearing cache, put CDN in dev mode, and nothing is changing.

    Is this a bug?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Hendrik Lersch

    (@riddler84)

    Hi Joyce,

    in my tests everything works fine. Just to clarify: Does the plugin not saving the rules in the admin panel or does it save the rules, but doesn’t execute these rules by deregister the JS or CSS files at the intended locations in frontend?

    Best regards

    Hi, the conditions do save. They don’t take effect on the site though. Meaning, if I set up a file to load on the “front page”, it still does. And so on – many conditions just don’t ‘happen’ on the actual site. But they appear ‘saved’ in the admin panel.

    Plugin Author Hendrik Lersch

    (@riddler84)

    Please check your PHP Version. The plugin needs at least PHP 5.5.0.
    But you say “many” conditions. Does this mean, that some conditions work and others not? I’m sry, but i need a few more infos about your rules settings and their effects, because i can’t see any potential bug in the code. Maybe it’s just a misunderstanding of the rules system settings. Could you please make a screenshot of the rules settings, which not work?

    Hi, I checked and we are on PHP 7.0.24

    Is this plugin compatible with PHP 7?

    By “many” conditions what I mean is, all the conditions I’ve tried. But I realize there are more possible scenarios and combinations, so I didn’t want to say “all” conditions.

    Here are three screenshot examples: https://cloudup.com/cc6g5_A27Ul

    In these cases, I’m trying to get scripts and styles not used on the home page to not show up on the home page. Or to only show up on pages and posts. And so on. I’ve tried different variations of rules to get the end result I want, and none seem to take effect on the site.

    I’ve used this plugin on other sites, with its past versions, and didn’t have this problem. I’m curious if it’s a result of the latest update?

    Or a PHP 7 compatibility issue?

    I dunno…just asking.

    Thanks for helping.

    You know what, today it’s working. This is strange. will continue to monitor if things go awry again. Sorry. I truly don’t know why, but don’t think I was crazy when I started this thread.

    Plugin Author Hendrik Lersch

    (@riddler84)

    Glad to hear it’s now working for you. Regarding your screenshots, all these settings should work. But the conditions of the second pic are tricky, because it depends hardly on your page-settings. They could only match if frontpage and blog homepage is the same page.

    And yes, it’s compatible with PHP 7. I have really no idea, what could cause an error like this, when it’s not a wrong condition setting.. so i hope it will not happen again 🙂

    Have a nice day.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Conditions not working’ is closed to new replies.