WordPress.org

Support

Support » Plugins and Hacks » JCrop wasn't working to crop thumbnails

JCrop wasn't working to crop thumbnails

  • Instead of loading the menu for thumbnail editing, I simply received the javascript error that the object object does not have a method jcrop.

    Fixed this by adding the following to the admin.php next to the other wp_register_scripts :

    wp_register_script('ngg-jcrop', NGGALLERY_URLPATH . 'admin/js/Jcrop/js/jquery.Jcrop.js', array('jquery'), '1.4.1');
    wp_enqueue_script('ngg-jcrop');

    I suspect this might be necessary since the edit thumbnail dialog is trying to load a javascript on an ajax call?

    http://wordpress.org/extend/plugins/nextgen-gallery/

Viewing 2 replies - 1 through 2 (of 2 total)
  • smigliorato
    Member

    @smigliorato

    The jquery.Jcrop.js file is actually loaded from

    *Your URL here*/wp-content/plugins/nextgen-gallery/admin/edit-thumbnail.php

    The ajax is loading that whole php script into a little window for you to edit the thumbnail. My version of the file does include the proper .js files, like so:

    <script src="<?php echo NGGALLERY_URLPATH; ?>/admin/js/Jcrop/js/jquery.Jcrop.js"></script>

    It also works just fine.

    If you put it into admin.php, the file will probably be overwritten when you update. Plus it loads in into every page, which is unnecessary (but probably harmless).

    Look in your edit-thumbnail.php file and see if you have that line. If you do, something else is wrong.

    If that is the case:
    What browser are you using? What is your setup like? Any more info?

    I suspect it might be due to varnish, but I’m not sure yet

    Yes I have the default files, and yeah with the update I’d have to re-apply the patch.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘JCrop wasn't working to crop thumbnails’ is closed to new replies.