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.
As requested in #1522532: Sorting issue with Field Collection in Views and #1809122: Support for generic entity? there is a need for more relationships as only for "node" and "comment".
The attached patch removes hook_votingapi_relationships() and adds a loop to register relationships for all entity types available in the system.
Thanks to Daniel Wehner for helping understanding Views a bit better!
Comment | File | Size | Author |
---|---|---|---|
#6 | votingapi-7.x-2.9-1823924.patch | 1.89 KB | dasRicardo |
#1 | votingapi-1823924.patch | 1.94 KB | dasRicardo |
Comments
Comment #1
dasRicardo CreditAttribution: dasRicardo commentedHere is the patch.
Comment #2
jay.lee.bio CreditAttribution: jay.lee.bio commentedWow, to think that a change of just a few lines of code can do such amazing things... Thanks das_ricardo, you are amazing. I neglected finishing up one of my sites because I couldn't get this critical feature working, but thanks to you, now I'm motivated to finish what I started. Your work can be seen live at http://discography.by, where I got "Top Rated Artists" & "Top Rated Albums" working easily months ago, but had trouble with "Top Rated Tracks" (which is the one that uses Field Collection) that now works beautifully. Thanks again.
Comment #3
Frank Ralf CreditAttribution: Frank Ralf commentedJust setting this back to RTBC until it is part of an official release ;-)
Comment #4
torotil CreditAttribution: torotil commentedThanks for your patch. I'm in favor of simplifying the API.
It has to wait for a 3.x though because it breaks API-compatibility. I hope to release a 3.x-version this year.
Comment #5
Frank Ralf CreditAttribution: Frank Ralf commentedWould leaving hook_votingapi_relationships() untouched help keeping API-compatibility so this patch could find its way into 2.x?
BTW: Setting this back to "normal" ;-)
Comment #6
dasRicardo CreditAttribution: dasRicardo commentedHere is a patch for votingapi-7.x-2.9
Comment #7
Kars-T CreditAttribution: Kars-T commentedHave this in production for months now. Please add this to the module.
Comment #8
torotil CreditAttribution: torotil commentedCommited to 7.x-2.x. Thanks a lot for providing the patch and testing.
Comment #9
Kars-T CreditAttribution: Kars-T commentedYay Thanks :)
Comment #10.0
(not verified) CreditAttribution: commentededit