Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
How about porting the flag integration to D7?
Comment | File | Size | Author |
---|---|---|---|
#6 | 1157660-6.patch | 2.78 KB | swentel |
Comments
Comment #1
swentel CreditAttribution: swentel commentedFlags come up as soon as the $links variable is placed into a layout, so not sure what else I could do here.
Comment #2
attiks CreditAttribution: attiks commentedI created a sandbox that exposes flags as fields, for the moment only for nodes.
Comment #3
AdamGerthel CreditAttribution: AdamGerthel commentedI found a very old thread recommending putting this in a custom field:
<?php return flag_create_link('favorites', $object->nid); ?>
But that doesn't work. Trying to flag something returns:
I'm gonna try your sandbox
Comment #4
swentel CreditAttribution: swentel commentedWill try to integrate this during the sprint this weekend.
Comment #5
AdamGerthel CreditAttribution: AdamGerthel commentedThe sandbox project in #2 works
Comment #6
swentel CreditAttribution: swentel commentedCommitted this in extras module.
Comment #8
AdamGerthel CreditAttribution: AdamGerthel commentedIs the sandbox version the same code that was committed to dev? I just discovered (when using the sandbox module) that it only works when there's just a single content type checked (in the settings screen for that particular flag). If you choose to have the flag available for more than one content type, the field disappears.
Comment #9
attiks CreditAttribution: attiks commentedComment #10
szantog CreditAttribution: szantog commented#8 The flag integration is done, moved into separate issue: #1710522: Wrong ui limit settings on flag fields