Are you planning to support both versions (2, 3) of flag module?

CommentFileSizeAuthor
#7 Selection_095.png15.92 KBjhedstrom
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

zilla’s picture

wondering the same thing

Renee S’s picture

This should already support both. (eta: I mean, it *does*. Is it not working? :)

bulat’s picture

Let me rephrase. When are you planning to stop supporting Flag 2?

amitaibu’s picture

> When are you planning to stop supporting Flag 2?

I know commons is using flag 2. Lets give them some time to port ... :)

zilla’s picture

it sort of supports both versions. what it requires right now is that a user manually update code by cutting and pasting into the core module file if one wishes to use, learn from or otherwise implement the example flags.

that, in my opinion, is like begging for problems and manufacturing headaches for typical users. for example: the suggested code to replace within the module is (typically) a fraction of the size of the original included in the original. you simply state to "cut and paste" and indicate the closing argument -but you have to remember that the default closing argument in the .module file is like 30 lines farther down - so you will wind up with users leaving all sorts of duplicate code, cruft and errors, in turn breaking the features and leading them back to these forums ;)

what you are guaranteed with this approach is a slew of issues in the project page.

my strong advice is to release a second version marked specifically for use with flags 3, not 2, and another for flags 2, not 3.

zilla’s picture

correction:

the README should be updated to let users understand how to import flags

the problem is that the System Message displayed suggests modifying the original file, which is what i'm afraid people are GOING to do if they are using system messages

jhedstrom’s picture

FileSize
15.92 KB

This should already support both. (eta: I mean, it *does*. Is it not working? :)

When viewing the flag page, all the bundled flags are incompatible with flag API 3,

Selection_095.png

and display this message:

The flag subscribe_node is currently using the Flag API version 2, which is not compatible with the current version of Flag. You can upgrade this flag by pasting the below code into message_subscribe_flag_default_flags() function in the message_subscribe.module file.

This isn't a huge issue since new flags can be created by the implementing module, but it would be nice if there were a clean way for the default flags to switch between api v2 and api v3.

jhedstrom’s picture

Disregard comment above, that was using alpha 5, dev code seems to work just fine with flag api v3.

bluegeek9’s picture

Issue summary: View changes
Status: Active » Closed (outdated)