Closed (fixed)
Project:
Drupal Commons
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
23 Oct 2012 at 15:20 UTC
Updated:
29 Nov 2016 at 20:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ezra-g commentedWe can still place Follow links on those pages using Panels with Flag 2.x.
Flag 2.x is a proven tool used on over 10,000 sites. Flag 3.x is still in alpha. In order to keep Commons stable and API-consistent, let's stick with Flag 2.x until Flag 3 is further along and the specific benefits of upgrading outweigh the drawbacks.
Comment #2
avr commentedYep - that makes sense. A side-effect is also a database change in the way that flag stores it's data.
Can you clarify how you were placing links through Panels?
(That same issue has a patch that works with Flag 2.x)
Comment #3
Zinger commentedSo this is a year old and Flag 3.x is out of alpha, out of beta and has some functionality we'd like to implement. Any chance Commons is likely to move beyond Flag 2.x anytime soon? (I already tried installing the module on a Commons 3.3 installation and the db changes are clearly substantial and would require hacking on the Commons core to make it work ... )
Comment #4
devin carlson commentedMarked #2050719: Allow commons_follow to handle flag api 3 as a duplicate.
Comment #5
Outdoor Ed commentedIs there a timeline for the implmentation of Flag 3? Another part of my site utilizes Flags and when I updated it killed several sections of Commons.
Comment #6
Zinger commentedYeah, and going back to where you were is pretty hard. I fortunately tried this on a dev site, as i ended up having to restore from backup afterwards.
Comment #7
devin carlson commentedUpdating the category and title to reflect the fact that Flag 2.x will go away at some point, so this is more of a task (that could be postponed) than a feature request.
The attached patch updates Commons with Flag 3.x support.
Changes include:
hook_flag_flag()andhook_flag_unflag()for commons_* modules which implementedhook_flag(). hook_flag() has been split into hook_flag_flag() and hook_flag_unflag(); added flagging parameterThe only remaining issue is to update the Flag Abuse module to support Flag 3.x which will be worked on in #2057901: Undefined property: flag_node::$content_type in flag_abuse_views_default_views().
Comment #8
ezra-g commentedThanks for this thorough patch and description.
I agree that this should likely be postponed for a future major version of Commons. Changing the version of Flag module in Commons would constitute an API change could break sites that have functionality built on Flag 2.x. We generally don't accept these kinds of feature changes within a major version of a distribution for that reason.
Flag 2.x is also by far the most widely used version branch of Flag module.
If we can make Commons compatible with both Flag 2.x and 3.x without introducing regressions, that seems OK for sites that want to upgrade to Flag 3.x and maintain those modifications from stock Commons. I think we'd need more complete behavioral test coverage to provide confidence that we're avoiding these regressions. In general, I'd look to the sites that need flag 3.x to contribute or even lead the development effort to provide that compatibility.
Comment #9
lsolesen commentedFlag 3.x seems to be used quite a lot now.
Comment #10
Timusan commentedAnymore updates on this?
Flag 3.x is by far the default now and upgrading Flags in a commons can lead to breakage.
The wonderful patch supplied by Devin is, unfortunately, out-dated as it applies on a development snapshot of 12 months ago, is there a chance to upgrade this patch to the code in the latest stable release?
Comment #11
gaele commentedComment #12
mrmartin commentedOops, it seems to be the Flag module got a security update and the 2.x branch is not maintained anymore. Anyone works on this? Devin's patch seems to be a bit outdated now, and require a little refactoring.
Comment #13
madjr commentedsubbed
Comment #14
devin carlson commentedAn updated version of #7.
Comment #15
devin carlson commentedTested #14 and committed to Commons 7.x-3.x.
I'm able to upgrade a local site but any issues with the upgrade path can be addressed in a follow-up issue.