i just installed Flag, and i get a lot of errors, so i investigated a little bit.

First bug:

On flag.install, line 22

  db_query("INSERT INTO {flags} (content_type, name, title, flag_short, flag_long, flag_message, unflag_short, unflag_long, unflag_message, roles, global, teaser, node_form) VALUES ('node', 'bookmarks', 'Bookmarks', 'bookmark this', 'Add this post to your bookmarks', 'This post has been added to your bookmarks', 'unbookmark this', 'Remove this post from your bookmarks', 'This post has been removed from your bookmarks', '2', 0, 0, 0)");

But, as i see in the hook_schema, "global","teaser" and "node_form" are merged into "options"

Second bug:

On flag.module, line 543

      db_query("INSERT INTO {flag_types} (fid, type) VALUES (%d, '%s')", $fid, $type);

In the schema there is no "type" field, but "node_type"

Other bugs:

Somewhere in flag.module, i have no idea about and no spare time now, but i found that, for some reason:
- I created a new Flag, and in flag_types i got records with "fid" = 3413 instead of 1 (and in the whole flag.module i can't find a query using "node_type" instead of "type"!)
- Modifying a Flag the form does not update the record but tries to re-insert it (maybe not a bug, but an effect of some bugs)

I hope this helps, as soon i can, i'll investigate further.

Sorry for my bad english.

Comments

quicksketch’s picture

Status: Active » Fixed

Thanks.... embarassing that I didn't try to *install* the module before making the first release :P

In your case, I believe you should simply be able to rename the "node_type" column to "type" and things will work fine. Otherwise, I've released a "beta2" that let's you install correctly. You can drop the database tables and install it a second time. Thanks for the report!

Luca O’s picture

How quick!
Now all is working fine, great module, i love it! Thanks a lot :D

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.