WordPress.org

Ready to get started?Download WordPress

Forums

Cookie Law Info
jquery.cookie.js file not found (6 posts)

  1. ralphonz
    Member
    Posted 11 months ago #

    Hi,

    For some reason the jquery.cookie.js file won't load. I've checked the directory and it is there. Permissions are 755.

    I get the following in the console:
    Failed to load resource: the server responded with a status of 404 (Not Found)

    This seems to be preventing the banner from showing.

    My theme uses the wordpress jquery (wp-includes/js/jquery/jquery.js) and i've tried disabling all my theme scripts with no luck: you can check it out here:

    http://keelmanslodge.co.uk

    http://wordpress.org/plugins/cookie-law-info/

  2. ralphonz
    Member
    Posted 11 months ago #

    If i change the name of jquery.cookie.js to jquerycookie.js or sausage.js then change
    wp_enqueue_script( 'jquery-cookie', CLI_PLUGIN_URL . 'js/jquery.cookie.js', array('jquery') );
    to match everything works?

    It's a mystery!

    I would like to solve it as i'd rather not have to change the code on every update.

  3. richardashby
    Member
    Plugin Author

    Posted 11 months ago #

    Hi

    This will probably be a permissions error as you have already identified. As this is specific to your server and not plugin related its not something I could help with (requires access to the server to do so)

    Some suggestions:
    - is this local host, a server, if a server is it a shared host or dedicated? Find out what group you are a member of by using 'whoami' then 'ls -ld' to check who owns it
    - how did you install the plugin: did you directly upload the code yourself (if so check which group you are a member of because that might be the issue) or did you install via the WP dashboard?
    - try uninstalling and re-installing from the WP dashboard

    Hope that helps

  4. ralphonz
    Member
    Posted 10 months ago #

    Hi,

    Sorry for not replying to this sooner. Just run into the same problem on another site, same server.

    It's a shared host, but I have ruled out a permissions error as other js files in the same folder (i.e. cookielawinfo.js) have the same permissions and they load fine.

    On two separate occasions I have had the same 404 error for jquery.cookie.js.

    I always install plugins from the WP dashboard and reinstalling the plugin has had no effect.

    On both occasions changing the file name and the enqueue script call has solved the problem so i'm not desperate for a solution but it would be nice to know why this is happening! If anyone could shed some light on this that would be great.

    thanks for the plugin though Richard, work is always appreciated :)

  5. richardashby
    Member
    Plugin Author

    Posted 10 months ago #

    Just had an 'aha' moment - I think this is Apache mod_security related:

    See https://drupal.org/node/522646
    Or Google "jquery.cookie.js mod_security"

    This still isn't something I can help you with unfortunately as it's your server not the code, but it should give you something more to go on. The solution you already found is a suggested fix, so you're good to go but as you correctly point out, any updates to the plugin will overwrite your changes.

  6. ralphonz
    Member
    Posted 10 months ago #

    Thanks for the help! That seems like the problem, it might explain few other things as well...

    I've contacted my host and hopefully I can get the mod_security rule changed :)

Reply

You must log in to post.

About this Plugin

About this Topic