Download & Extend

Naming conflict with Views

Project:Flag Abuse
Version:7.x-2.x-dev
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:reviewed & tested by the community

Issue Summary

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.

Comments

#1

seeing the same error

#2

me too, need help.

#3

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.

#4

subscribe

#5

Status:active» needs review

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

AttachmentSize
1201428-default-view-flag-fix.patch 1.34 KB

#6

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

#7

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

#8

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.

#9

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

#10

Status:needs work» reviewed & tested by the community

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.

AttachmentSize
1201428-10.patch 2.14 KB

#11

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

AttachmentSize
flag_abuse-1201428-11.patch 2.03 KB

#12

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