It would be nice to consider using the 3.x version of Flag and tracking this issue/patch:

#332956: Flag Ctools integration

This allows for "Follow Links" to be used in Panels (for things link User and Group pages).

Comments

ezra-g’s picture

Status: Needs review » Postponed

We 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.

avr’s picture

Yep - 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)

Zinger’s picture

Version: » 7.x-3.3

So 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 ... )

devin carlson’s picture

Outdoor Ed’s picture

Is 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.

Zinger’s picture

Yeah, 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.

devin carlson’s picture

Title: Consider Using 7.x-3.x version of Flag and include CTools integration patch » Accomodate the changes required to update to Flag 3.x
Version: 7.x-3.3 » 7.x-3.x-dev
Component: Miscellaneous » Code
Assigned: Unassigned » devin carlson
Category: feature » task
Status: Postponed » Needs review
StatusFileSize
new50.89 KB

Updating 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:

The 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().

ezra-g’s picture

Title: Accomodate the changes required to update to Flag 3.x » Accomodate the changes required to update individual Commons sites to Flag 3.x

Thanks 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.

lsolesen’s picture

Issue summary: View changes

Flag 3.x seems to be used quite a lot now.

Timusan’s picture

Anymore 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?

gaele’s picture

Status: Needs review » Needs work
mrmartin’s picture

Oops, 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.

madjr’s picture

subbed

devin carlson’s picture

Status: Needs work » Needs review
StatusFileSize
new58.6 KB

An updated version of #7.

devin carlson’s picture

Status: Needs review » Fixed

Tested #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.

Status: Fixed » Closed (fixed)

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