Support » Plugin: NextCellent Gallery - NextGEN Legacy » MySQL errors on moving images

  • When trying to move images from one gallery to another, it fails silently: looks like it worked, but no images are moved. Here is the error in my error log:

    WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 1 for query SELECT t.*, tt.* FROM wp_646_ngg_gallery AS t INNER JOIN wp_646_ngg_pictures AS tt ON t.gid = tt.galleryid WHERE tt.exclude != 1 ORDER by pid DESC limit 0, made by NGG_Gallery_Widget::widget

Viewing 1 replies (of 1 total)
  • Thread Starter Stevish

    (@stevish)

    Ok, it turns out the MySQL error was unrelated. I was able to track down the issue though. When I was moving the images, the field TB_action was not being set. This seems to be because the javascript function set_tb_command in class-ngg-manager.php on lines 245-247 was looking for a hidden field with an ID of TB_action to set the value to move_to:

    jQuery('#' + id + "_dialog #TB_action").val(command);

    This was failing because the hidden field with the NAME TB_action had no ID set. I modified line 128 to add the ID:

    <input type="hidden" id="TB_action" name="TB_action" value="">

    Is it possible for you to make this update in your core so that this doesn’t break again whenever we upgrade?

    • This reply was modified 4 years, 4 months ago by Stevish. Reason: Fixing formatting
    • This reply was modified 4 years, 4 months ago by Stevish.
Viewing 1 replies (of 1 total)
  • The topic ‘MySQL errors on moving images’ is closed to new replies.