I followed the README.txt file, but in "Display fields" I do not have any kind of "Image with annotations". What can be the problem? It would be nice if someone extend the documentation of the module, because it is difficult to understand and it is too short.



vaphab’s picture

Version:6.x-1.2» 6.x-2.0

The right version of the comment is 6.x-2.0.

vaphab’s picture

The "manage field" there is no "image" anymore, but in the image_annotation.module use it. I change "field types" from "image" to "filefield" in the function image_annotate_field_formatter_info() function. So the annotation is appear, but do not work. Probably the problem is with the jquery ui.
Do you know how to solve?

vaphab’s picture

The error is the following (/var/log/apache2/error.log): File does not exist: /var/www/image-annotate, referer: https://drupal-site/?q=node/9
Help me!!!!!

vaphab’s picture

The problem probable appear in 'tag.js" file in the editable.note.load('/image-annotate/create/' + this.nid, {}, function() {
Help meeee!!!!

hunvreus’s picture

Hi vaphab,

First thing, people contributing modules to the community are volunteering their time and work; posting a cascade of comments ending up on "Help meeeee!!!!" is, IMO, usually not helping you getting support from a module maintainer. I myself run a business in China and do not always find time to answer issues during the week.

I am organizing a Drupal Meetup tomorrow in Shanghai and was planning on recording an explanatory video while exposing Image Annotate to the attendees. It should be online tomorrow evening and should help you go through the basic configuration. If this is still not working , I'd be happy to set up a quick discussion on IRC or Skype to help you out with configuration.


vaphab’s picture

Priority:Normal» Critical

There is a bug in the version 2.0. If you do not install your drupal to the root of your web then you get the same error what I got: (/var/log/apache2/error.log): File does not exist: /var/www/image-annotate, referer: https://drupal-site/?q=node/9


in image_annotate.module:
after the
// Load all the JS and CSS magic
line I put
$js = "var Drupal_base_path = '". base_path() ."';";
drupal_add_js($js, 'inline');

This variable Drupal_base_path will contain the relative directory of drupal from the web root.

In tag.js
I changed the line:
editable.note.load('/image-annotate/create/' + this.nid, {}, function() {
editable.note.load(Drupal_base_path + '/image-annotate/create/' + this.nid, {}, function() {
and the line:
form.attr('action', '/comment/reply/'+ image.nid); /* Evil! */
form.attr('action', Drupal_base_path + '/comment/reply/'+ image.nid); /* Evil! */

These modification just add the relative path which was missed.
After you have to repack the tag.js to tag.packed.js

Now the from appear and I can store comments, but still I can not resize and move the annotation box.

vaphab’s picture


Other BUG. The code do not working without clean URLs. The problem is same then before, the code does not consider "?q" when it uses links. The same bug is exist in fotonotes also.

SOLUTION is to use clean URLs follow the following instructions:

jorgeegomez’s picture

Title:There is no "Image with annotations"» Module doesn't work in subdirectories

@vaphab: Good work in tracking down the problem.

I agree that modules should work in sites where Drupal is not in the URL root, and even in sites with clean URLs disabled.

Please review http://drupal.org/patch to create a patch with your comments, in order for the module developer to include it easily into the project. I took the liberty of modifying the bug's title to reflect your input. Perhaps you can submit another bug for the "doesn't work without clean URLs" case.

icarus75’s picture

Status:Active» Needs review
new2.1 KB

Drupal's base path is already made available in a Javascript variable called Drupal.settings.basePath. Here's a patch that can be applied to tag.js using this variable.


jjustman’s picture

icarus75, thanks, but is there a reason you included '/content' in the path there? Is that something from the dev build? I removed that fragment and now I'm all set (all together I needed this patch, turn on clean URLs, and get jquery_ui 1.6).

Edit: I still have a problem when I edit a note. I will open a separate issue if needed; still, knowing the significance of 'content' would help.