I am attempting to add the Comment Abuse module to enable users report comments which may be offensive.
https://www.drupal.org/project/comment_abuse
However, the links doesn't appear on the comments. Followed all the setup instructions for the module.
Is there any reason why OA may not be rendering the link?
Is there another way to do this?
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | flag_config.txt | 991 bytes | bherring |
| #11 | error_log2.PNG | 24.87 KB | bherring |
| #11 | error_log1.PNG | 20.69 KB | bherring |
| #11 | comment_abuse_AJAX-ERROR.PNG | 63.72 KB | bherring |
| #10 | 2515104-oa_comment-nohref-10.patch | 600 bytes | hefox |
Comments
Comment #1
mpotter commentedThe theming of comments was not handling additional links correctly. I've pushed some new code to the oa_comments module in commit: 6c6a2f9. That should allow any normal comment link to appear now. This will be in the 2.43 release.
Comment #2
bherring commentedThanks Mike
Has this commit been posted?
Comment #3
dpoletto commented@bherring: have a look here (that's from http://cgit.drupalcode.org/oa_comment/)!
Comment #4
bherring commentedI have installed a fresh copy of 2.43 and Comment Abuse as the only additional module.
The links now appear but throw ajax errors.
Ive tried configuring the module with both options to use simple link or popup.
I am now also getting an error
Notice: Undefined index: href in oa_comment_preprocess_comment() (line 113 of /xxxxxxx/profiles/openatrium/modules/apps/oa_comment/oa_comment.theme.inc).
Comment #5
mpotter commentedProbably need to post this over in the Comment Abuse module. The 2.43 version of Atrium now adds any links added by other modules. Links are required to have a "title" and "href" field. Sounds like the link added by Comment Abuse is missing the "href" field.
Comment #6
hefox commentedI believe http://cgit.drupalcode.org/comment_abuse/tree/comment_abuse.module?h=7.x... is the code that creates the 'link' for comment abuse.
As seen by theme_links documentation
what comment abuse is doing is valid for comment links, but makes it rather hard for anyone who wants to override the themeing of links. Comment abuse links are links, but have special classes/etc. from ctools functions (which return the link rendered) to make the ajax work.
So, comment abuse isn't doing anything wrong, but what is doing makes it harder for people to customize the display of comment links.
Perhaps openatrium can print any comment links that don't have href in a different area?
Comment #7
mpotter commentedYep, we can probably handle this then. Didn't realize href was optional. The code in oa_comment.theme.inc around line 112 just needs another if case for this.
Comment #8
hefox commentedComment #9
hefox commentedbherring:
Does this on the mentioned line (112 of oa_comment.theme.inc) fix comment abuse?
Comment #10
hefox commentedFigured I could actually make a patch
Comment #11
bherring commentedDoesn't seem to have.
I applied the patch, disabled, enabled, cleared cache, etc.
Still getting AJAX error see attached.
Also see 2 errors from error log attached
Comment #12
bherring commentedAs an option I tried add a FLAG which would be a reasonable solution.
However, the link doesn't appear
See my config attached
Comment #13
socialnicheguru commentedThis occurs with anything that adds links to comments like http://drupal.org/project/comment_registration
Both "Log in" and "register" are both links themselves
Comment #14
socialnicheguru commentedThe patch worked for me after clearing caches and registry
drush cc all
drush rr --fire-bazooka
Comment #15
hefox commentedThe patch purely allows the link to appear, and based on the comment about there being an ajax error, looks the patch worked for bherring. So the original issue is fixed, but looks like new issues were revealed, though I'm guessing those issues may be comment abuse issues instead of oa issues.
Comment #16
hefox commentedShould add, patch commited to oa_comment
Comment #17
bherring commentedI am now using the flag module. However, to show the flag link I needed to modify oa-comment--comment.tpl.php and insert
print flag_create_link('[flag_name]', $comment->cid);Is there a way to add this without altering the template file?
Comment #18
AntiNSA commentedI need to flag comments... did you figure this out?
Comment #19
cgove commentedComment Abuse module works fine for me using their latest dev version on current OA.