Support » Plugin: WP Scripts & Styles Optimizer » Single Page URL entries generate error

  • Great product – many thanks.

    I am trying to use the Single Page feature instead of Global.

    Any type of entry generates an error that rejects the input.

    What is the acceptable form used or has this feature been switch “off” for this version?

    I look forward to your response!

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



    No, this feature hasn’t switched off, it should work. The acceptable form is any URL, which points to the WordPress site the Plugin is running on. It will be checked via PHP’s cURL to get the query-string WordPress uses to routing a request and show the right page to the user.

    Unfortunately i can’t reproduce the error you describe. Could you provide me a few infos about your environment?

    • What kind of error does appear?
    • Which WordPress Version is in use?
    • Which PHP Version?
    • Do you use any kind of subdomain or WordPress in a subfolder? Maybe Multisite etc. ?

    Best regards


    To answer your questions regarding this error”

    1. Textual error appears after entering properly formed URL for single page. “Url cannot be loaded or you have tried to check the front page – Statuscode: 0”
    2. WordPress version 4.8.2
    3. PHP version 5.62
    4. No multisite – all files accessible from root –

    I look forward to quick resolution of the problem.

    Also, is it advisable to set the plugin so it stops frontend visitors (not Admin) from loading WordPress adminbar files? (.JS and CSS)

    Plugin Author Hendrik Lersch


    Ok, i have released a new version of the plugin. Please update and test if the error is gone.
    It may be possible that the cURL library is deactivated in your PHP installation. I don’t use it anymore and switched to WordPress’s HTTP-API. I hope this fix the issue.

    Also, it’s no problem to deactivate the admin bar JS and CSS files. But you should additionally write something like this into your functions.php.

    if ( ! current_user_can( 'manage_options' ) )
        add_filter( 'show_admin_bar', '__return_false' );

    Otherwise you will have a 30px gap at the top of your site. This code will hide the admin bar for everyone else but admins. But it don’t remove the files, so using my plugin to unload them for non-admins is totally ok. 😉


    I tried the new version of the plugin but the same error message occurs no matter what I try to input on URL field. This is frustrating.

    I will try your code in functions.php file and see if that works as desired. I want the frontend not to load or display Admin-bar.

    Thank you for your prompt reply!

    Plugin Author Hendrik Lersch


    That’s not good. I will try to find another solution. Is there a status message after the status code? I have added it with the last update.

    Hi Hendrik,

    Here is the status code I receive when the single page URL is entered into the field:

    “Url cannot be loaded or you have tried to check the front page – Statuscode: 0 – Message: ”

    I hope this helps!

    Plugin Author Hendrik Lersch


    Unfortunately i don’t really know, what’s happening here. Firstly i thought it’s because you haven’t installed the cURL library and/or allow_url_fopen was set to “Off” in your php.ini. That’s because i switched from using just cURL to using the WP-HTTP API, which uses many different (and more directly) ways to make HTTP-Requests.

    I have tested it with deactivated cURL and allow_url_fopen set to “Off” and the API was still be able to establish a connection.

    The status code “0” is also not a HTTP response code. It indicates more likely, that the request couldn’t be performed at all.

    I will looking for an additional way to add pages to the list, maybe via AJAX or manually via an admin bar button on the target site. But this could take a few days, because i’m a bit busy at the moment 😉


    Unfortunately I cannot provide more information for diagnostics. The plugin is still performing well in Global mode and I can use the various selections to exclude .JS and CSS from loading on pages where it will improve load speed.

    I know you will find a solution. From my personal experience I know others will have the same issue but fail to report it and move on to another solution or plugin.

    Thanks for your fast reply!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Single Page URL entries generate error’ is closed to new replies.