• Resolved KentAjans

    (@kentajans)


    Hey friend,

    You target really nice gap on WP, congrats…

    2 problems I have faced when i give a try:

    1) even you disable some js files, its not remove (for example new royal slider). And for single page options (which is awesome) how can I target homepage? I found it with longer link but its not apply anthing to it (eg: http://www.website.com/home-page)

    2) The urgent one is that fatal error occurs when I defined some simple conditional rules such as load contact form 7 js file if page is contact page.

    Here is the message from source code:
    <b>Fatal error</b>: Call to undefined function boolval() in
    ../public_html/wp-content/plugins/wp-script-optimizer/classes/conditions.class.php(715) : eval()’d code on line 1

    I wonder that defer and combine js/css soon which will impact more success on your plugin

    Bests,

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

    (@riddler84)

    Hello, sry for the late answer. I’ll try to give a few explanations 🙂

    1) even you disable some js files, its not remove (for example new royal slider). And for single page options (which is awesome) how can I target homepage? I found it with longer link but its not apply anthing to it (eg: http://www.website.com/home-page)

    If you see a file which is not deactivated, even though you have disabled it, then it’s most likely the case, that WordPress enqueued it nevertheless, because it’s internal script logic. However, it shouldn’t happen, since the plugin deregisters all files completely that are handled with it, before it register them again depending on the settings for each file.

    I will investigate this. Have you experienced this with other plugins too, except the new royal slider?

    That you can’t choose the front-page of your site on the “single pages” tab, has the simple reason, that these scripts are already “global” scripts. Every script or style that is added from third-party plugins, without further restrictions, where it should be enqueued, is automatically enqueued on the front-page of your site. For all other sites you have the possibility to use the “single-pages” tab.

    Maybe i add an option at some time, to specify the site from which “global”-scripts are scraped. But right now i don’t see a big need to do this.

    2) The urgent one is that fatal error occurs when I defined some simple conditional rules such as load contact form 7 js file if page is contact page.

    Here is the message from source code:
    <b>Fatal error</b>: Call to undefined function boolval() in
    ../public_html/wp-content/plugins/wp-script-optimizer/classes/conditions.class.php(715) : eval()’d code on line 1

    This sounds like you’re PHP version is too low. The boolval() function is only avaiable since PHP 5.5.0.
    I use this function to make sure that i get nothing else back than a boolean true or false to check if a condtion is fulfilled or not. This is important due to security reasons.

    I wonder that defer and combine js/css soon which will impact more success on your plugin

    I hope so 🙂
    I’m working right now on these features like minify, combine, async/defer etc. But it’s a lot to do, so i can’t say how long it will take 😉

    Best regards

Viewing 1 replies (of 1 total)
  • The topic ‘conditional rules occurs fatal error’ is closed to new replies.