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.
An out-of-the-box installation of the Flag Abuse module names flag "abuse_comment". Is this correct?
The name appears to trigger the following warning in views:
This view is looking for a flag by the name "comment_abuse", but there is no such flag. Perhaps it was deleted. Please update the relationship "Flags: comment_abuse by any user" in this view to use an existing flag.
Comment | File | Size | Author |
---|---|---|---|
#11 | flag_abuse-1201428-11.patch | 2.03 KB | rooby |
#10 | 1201428-10.patch | 2.14 KB | roderik |
#5 | 1201428-default-view-flag-fix.patch | 1.34 KB | bojanz |
Comments
Comment #1
jacobpov CreditAttribution: jacobpov commentedseeing the same error
Comment #2
jensen9090 CreditAttribution: jensen9090 commentedme too, need help.
Comment #3
trrroy CreditAttribution: trrroy commentedI have the same problem. I tried to change the name in the code for the view but it didn't update even after a disable, uninstall, re-install of the module.
Comment #4
mototribe CreditAttribution: mototribe commentedsubscribe
Comment #5
bojanz CreditAttribution: bojanz commentedHere's a patch. Of course, you need to clear your cache after applying it, so that the new default view is pulled.
If you overrode the view, then revert it (you'd have a "revert" link in the dropdown in the views list).
Comment #6
rich.3po CreditAttribution: rich.3po commentedHi
I tried applying your patch and got the following error when trying to view or edit the view:
Fatal error: Call to a member function addField() on a non-object in /data/drupal7/sites/nas-cop/site/sites/all/modules/contrib/flag/flag.module on line 942
I've flushed the cache, and didn't need to revert the view since it wasn't overridden etc
Thanks
Rich
Comment #7
rich.3po CreditAttribution: rich.3po commentedHi
After a bit of investigation and attempting to rebuild the view field by field, i've discovered that the culprit appears to be the "Flags: Flag link" field
This is the field that provides the 'reset flags' link. If this field is removed from the abuse_comment view, the view works as expected. Is this an issue with flag_abuse module, or does it come down the the flag module itself? Note that the abuse_node view does not suffer the same symptoms.
Any advice / pointers greatly appreciated
Comment #8
sirkitree CreditAttribution: sirkitree commentedWhat version of Flag module are you using? There have been some changes recently in Flag module that I've not kept up with. I was waiting for it to stabilize a bit more before I dig in here again.
Comment #9
rich.3po CreditAttribution: rich.3po commentedHi
I'm using the latest non-dev release, ie 7.x-2.0-beta6. It was released about a month ago. Should i be using the dev version? (which worries me slightly...)
Cheers
Comment #10
roderikYes you should be using the dev version (and running update.php) - there's a bug for comments, reported/solved in #1116690: Method flag_flag_access_multiple() on 'comment' flags broken.
The patch in #5 still fixes the original issue. Attached patch is the same - it just replaces one extra comment line. Credit bojanz.
Comment #11
rooby CreditAttribution: rooby commentedHere is a re-roll of #10 that applied to latest dev.
Comment #12
rooby CreditAttribution: rooby commentedAh, it is the same as the previous patch but was rolled form the module direcetory instead of the root of the site.
Comment #13
LeDucDuBleuet CreditAttribution: LeDucDuBleuet commentedPatch in #11 is working as expected, ready to be ported! Thx
Comment #14
cwithout CreditAttribution: cwithout commentedConfirm patch in #11 works. Ready for commit.
Comment #15
ezra-g CreditAttribution: ezra-g commented#11 is committed. Thanks!
http://drupalcode.org/project/flag_abuse.git/commit/7c0ddec