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.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jacobpov’s picture

seeing the same error

jensen9090’s picture

me too, need help.

trrroy’s picture

I 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.

mototribe’s picture

subscribe

bojanz’s picture

Status: Active » Needs review
FileSize
1.34 KB

Here'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).

rich.3po’s picture

Status: Needs review » Needs work

Hi

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

rich.3po’s picture

Hi

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

sirkitree’s picture

What 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.

rich.3po’s picture

Hi

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

roderik’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
2.14 KB

Yes 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.

rooby’s picture

FileSize
2.03 KB

Here is a re-roll of #10 that applied to latest dev.

rooby’s picture

Ah, it is the same as the previous patch but was rolled form the module direcetory instead of the root of the site.

LeDucDuBleuet’s picture

Patch in #11 is working as expected, ready to be ported! Thx

cwithout’s picture

Confirm patch in #11 works. Ready for commit.

ezra-g’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.