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.
Has been discussed here: #1848282: Can't see the link to flag a user & here: #1710522: Wrong ui limit settings on flag fields but as the DS module creator said is a different issue so I'm opening a new one here.
Summary: Flag links are correctly showed on User profiles until a DS template is applied (several test are described on the other post to arrive to this conclusion). DS creator says is not a bug but an unimplemented feature.
Comment | File | Size | Author |
---|---|---|---|
#22 | Screen Shot 2014-12-17 at 10.10.52 PM.png | 37.47 KB | frankcarey |
#4 | ds-flag_entities-1849378-4.patch | 1.79 KB | jnpwebdeveloper |
#3 | ds-flag_entities-1849378-3.patch | 1.14 KB | jnpwebdeveloper |
Comments
Comment #1
ericinwisconsin CreditAttribution: ericinwisconsin commentedI'm having the same issue.
Comment #2
jnpwebdeveloper CreditAttribution: jnpwebdeveloper commentedYes I need this feature too. The flag integration appears to be for nodes only. It would be good to have this available for all entity types.
Comment #3
jnpwebdeveloper CreditAttribution: jnpwebdeveloper commentedI think we need to support all entities. I have created a patch which allows the flag field to be enabled on all of them.
Comment #4
jnpwebdeveloper CreditAttribution: jnpwebdeveloper commentedActually just realised the links were not working correctly. Here is a confirmed working version that should support other entities but needs testing.
Comment #5
mthak CreditAttribution: mthak commentedRe-roll against latest dev?
Comment #6
joachim CreditAttribution: joachim commentedI'm not sure this patch is needed now that Flag 3.0 is out. That provides an option to expose flag links as extra fields.
Comment #7
BParticle CreditAttribution: BParticle commentedIt is still needed, I think, because I'm using display suite to render user profiles, and I can't find a flag link anywhere except in the user's edit form.
Comment #8
joachim CreditAttribution: joachim commentedProfile are not users, they are another type of entity. So they don't show the user's flags, but the flags on the profiles.
If you want to show user flags on profile entities, then you want a wholly new feature -- similar to the feature request for commerce product flags to show on nodes.
Comment #9
joachim CreditAttribution: joachim commentedComment #10
BParticle CreditAttribution: BParticle commentedReally? If I have selected the 'Display link as field' option for my flag, shouldn't I find it on the manage display form for users? Seems logical enough, but maybe I am mistaken.
Comment #11
joachim CreditAttribution: joachim commented> If I have selected the 'Display link as field' option for my flag
Is your flag a flag on Users or on Profiles?
If it's a flag on Users, then yes it should. If it doesn't, please file a bug.
If it's a flag on Profiles, then it won't.
Comment #12
BParticle CreditAttribution: BParticle commentedIt's a flag on users, but I guess this bug has already been reported here https://drupal.org/node/1848282
and here https://drupal.org/node/1849378EDIT: last issue is actually this one
Comment #13
BParticle CreditAttribution: BParticle commentedSo, in short, I tried the patch and didn't find anything changed, unfortunately.
Comment #14
joachim CreditAttribution: joachim commentedI'm not sure what the patch is meant to do. At any rate, it's obsolete, since Flags as pseudofields are now part of Flag 3.
What we'd need for this is for a flag on entity A to be available to display on entity B, based on a relationship between A and B. This could be done as a Display Suite field type. You'd get the relationships from Entity API's entity metadata: any property which is a single-valued entity relationship could give you a relationship flag to display.
Comment #15
aspilicious CreditAttribution: aspilicious commentedtagging flag issues
Comment #16
aspilicious CreditAttribution: aspilicious commentedOk can someone explain to me what has to be done (or provide a proper patch?) :)
If I understand the last comment correctly we can only do this by relying on entity api?
That is not going to happen, so I hope I'm wrong.
Comment #17
joachim CreditAttribution: joachim commentedI *think* what is being requested is the ability to show flags for users on user profiles, or flags for user profiles on users.
I think the best way to accomplish this would be a DS field type.
And I think the mose useful and reusable way to do this would be allow chaining through relationships, to get any DS field at the end of the chain.
So, if you wanted to show a user flag (or indeed any user display field) on a node, you'd use the 'author' relationship that Entity API defines on nodes.
This would probably be best tackled in a new contrib module.
Comment #18
aspilicious CreditAttribution: aspilicious commentedIsn't this something flag module can provide in seperate flag_ds module?
Comment #19
joachim CreditAttribution: joachim commentedI'd rather not have more to maintain in the Flag project!
Furthermore, it could be generic for all fields, and not dependent on Flag.
Comment #20
aspilicious CreditAttribution: aspilicious commentedSame for DS :)
I feel your pain...
I still don't understand what has to be done here...
I'll leave this issue open for now, maybe I get it when I read it a few times in the following weeks :)
Comment #21
joachim CreditAttribution: joachim commentedAs I see it, a new DS field type which lets you chain through relationships.
So, for example, suppose I have a field on users called 'birthdate'.
I create a new 'chained' field called 'node author birthdate'.
I tell this chained field:
- you apply to nodes
- follow the 'author' Entity API property on a node
- on the entity you now have, get the display of the 'birthdate' field
I can then show the birthdate of the node author on each node.
So the OP's request becomes a new chained field with these settings:
- you apply to users
- follow the 'profile_foo' property of the user to get the 'foo' profile for the user
- on the entity you now have, get the display of the 'flag_bar' pseudofield
This could be new contrib module which would obviously depend on DS, and also on Entity API because it would use the relationships defined in Entity API metadata. The fact that flags would work with it would be a mere byproduct of flags being exposed as pseudofields.
Comment #22
frankcarey CreditAttribution: frankcarey commentedFYI, it looks like non-node flag isn't fully supported since I lose the field template options.
Screenshot attached
Comment #23
aspilicious CreditAttribution: aspilicious commentedProbably because it's an "extra field" and not a real "field" or "ds field"
Comment #24
aspilicious CreditAttribution: aspilicious commentedDo not have the time for D7 feature request, and to be honest I don't think anyone else is going to work on this.
Closing for now unless someone disagree.