I am using tcpdf to generate a PDF. The PDF generation adds images that have been uploaded. The order of the images matters. After I upload files in Drupal 6 using the upload module, Drupal 6 randomly orders the images (or attachments).

The uploaded images are draggable. But when I drag them to re-order and hit save, the order goes back to what Drupal thinks is best.

How can I change this behaviour to let Drupal recognise my re-ordering?


  • Check for javascript errors in page as well.
    – niksmac
    May 20, 2013 at 3:52

1 Answer 1


It looks like your re-ordering script is buggy. Make sure it saves the state of the ordering. There should be something in your re-ordering script that tracks the order. Make sure it works. This can be fixed if you have access to the re-ordering script.

  • 1
    Another approach is to study how the upload script does the ordering then probably beat it by uploading the images the order you want it. maybe the upload script uses file size, time or file name to do the re-ordering.
    – eyedol
    Mar 15, 2012 at 5:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.