NextGEN Gallery
JCrop wasn't working to crop thumbnails (3 posts)

  1. Markus Stefanko
    Posted 3 years ago #

    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');

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


  2. smigliorato
    Posted 3 years ago #

    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?

  3. Markus Stefanko
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • NextGEN Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic