The "Add a note" link appears; I can now move and resize the frame, enter and save the comment which appears correctly. However, nothing changes in the appearance of the image - the frame never appears again.

Comments

robert.oconnell’s picture

subscribe

robert.oconnell’s picture

It appears that the SQL is incorrect that retrieves the notes. Currently no notes were being retrieved. However, after modifying the SQL in theme_image_annotate_formatter_image_annotate from

    $result = db_query('SELECT i.*, c.uid, c.comment, u.name '. 
    ' FROM {image_annotate} i ' . 
    ' JOIN {comments} c ON i.cid = c.cid ' .
    ' JOIN {users} u ON c.uid = u.uid ' .
    ' WHERE i.field_name = \'%s\' AND c.nid = %d ' .
    ' ORDER BY (i.size_height*i.size_width) ASC',
     $field['field_name'], $element['#node']->vid);

to

    $result = db_query('SELECT i.*, c.uid, c.comment, u.name '. 
    ' FROM {image_annotate} i ' . 
    ' JOIN {comments} c ON i.cid = c.cid ' .
    ' JOIN {users} u ON c.uid = u.uid ' .
    ' WHERE i.field_name = \'%s\' AND c.nid = %d ' .
    ' ORDER BY (i.size_height*i.size_width) ASC',
     $field['field_name'], $element['#node']->nid);

The SQL now brings back data.
I think that the node id is correct, whereas the version id is incorrect?
(Note that I added carriage returns and string appending in the code above for readability while debugging.)

robert.oconnell’s picture

This appears to be redundant with the issue http://drupal.org/node/724240.

antoh’s picture

when i click on add a note, Save button does not appear.. any ideas?!