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.
If you enable all the modules fresh, and only enable the Subscribe OG flag the view doesn't work. As far as I can see it looks at the relationship on the subscribe_node view but that relationship points at the subscribe_node flag, rather than the subscribe_og one. I'm not sure how this was intended to work.
I've formatted a patch which adds in a new Subscribe OG view. I've also marked all the views as disabled initially, it will enable them automatically if they are used.
I fixed a few typos and coding standards errors too.
Comment | File | Size | Author |
---|---|---|---|
#11 | message_subscribe-subscribe_og_fix-1983226-11.patch | 13.59 KB | k_zoltan |
#7 | message_subscribe-subscribe_og_fix-1983226-7.patch | 13.59 KB | dalinian |
subscribe_og_fix.patch | 10.02 KB | Paul Lomax | |
Comments
Comment #1
Paul Lomax CreditAttribution: Paul Lomax commentedComment #3
amitaibuThe flag name isn't per content -- it's per a certain logic you want. You can have 10 different flags for nodes (i.e. the "node" in the name doesn't imply the logic).
I think it's better to throw an exception. Enabling a view is something the admin should do.
Comment #4
Paul Lomax CreditAttribution: Paul Lomax commentedYeah i'd probably ignore this patch, i'll see if I can do another.
I do feel if you are going to provide a default OG flag, then it does need a corresponding view. Currently if you enable just the subscribe_og flag the Subscriptions tab on the user page will throw an error.
So two things need to happen when enabling a default flag,
This could be done by extending flag_flag->enable()?
Comment #5
wuh CreditAttribution: wuh commentedJust wanted to chime in and say that I agree with Paul, I think the default OG flag needs a corresponding view. It's just confusing not to have it when the others are provided.
Great module :)
Comment #6
amitaibu@Paul Lomax,
Are you going to re-roll this? I'd like to roll a new release soon.
Comment #7
dalinian CreditAttribution: dalinian commentedI concur with this assessment, though I think there are other non-intuitive aspects to this module, like requiring the email_node flag to be set. Nonetheless, I thought I would take a stab at fixing this particular issue. I think, I've managed to do it with a relatively simple additions.
As far as I can tell, this achieves what we want. I did not disable the views automatically, but I did do an og module check against them, so they will not be visible unless the og module exists. I'm attaching a patch with these changes.
Comment #8
amitaibuThe reason we use subscribe_node_email and not subscribe_og_email, is that OG can work with any fieldable entity, so the name OG would be a bit confusing here.
Comment #9
dalinian CreditAttribution: dalinian commentedI actually do not think it's confusing at all since the variable refers to a view that refers to entities to which og has been applied, but I'm happy to change the variable value and the view name. Do you have a better suggestion? It must be different from the default subscription value in order to call the correct view.
Comment #10
amitaibuI think I might have mistaken in my previous comment. I'll need to re-review the code.
Minor:
if( => if (
Comment #11
k_zoltan CreditAttribution: k_zoltan commentedFixed minor issue refered by @Amitaibu
Comment #12
k_zoltan CreditAttribution: k_zoltan commentedLet's test the latest patch
Comment #15
RKopacz CreditAttribution: RKopacz commentedJust gently checking in to see if there is any news on this? I will try to look at it myself, but my PHP skills are not that advanced and this seems to be a complex module. I have a current use case to which I would like to apply it.
Comment #16
sadashiv CreditAttribution: sadashiv commentedHi,
Would be nice if anyone can test https://www.drupal.org/node/2406413#comment-9513319 and update.
Hth,
Sadashiv.
Comment #19
bluegeek9 CreditAttribution: bluegeek9 as a volunteer commented