Hi,

First off thank you very much for this module; I'd very much like to use it on my site but every time I click on a flag as inappropriate link I got directed to a 404 page... I'm very new to Drupal so I'm not sure what went wrong. I did try to re-upload the module again but got the same result.

Any help appreciated, thanks in advance !

CommentFileSizeAuthor
#9 abuse.goto_.patch1.43 KBmikegull
#3 abuse-404.patch804 bytesAzzor

Comments

btmash’s picture

Hi Shirster,

I have a few questions regarding the nodes that this is applied to the node this operation would be performed on:

1) Is this content you created (its been written such that you are not allowed to flag your own content)?
2) Does your user have the required permissions to be able to flag content (in the access control)?
3) Is the content type allowed to be flagged?

Basically, any more information you can provide to help me narrow down the problem would be great :)

-BTM

pgmillion’s picture

I've run into this as well. I finally realized that it was happening when I tried to report on nodes that I created (I was testing a site). I'm not sure that this is really a bug since the use-case might not be valid. Perhaps rather than giving a 404 error it can give a better message?

Thanks,
pgmillion

Azzor’s picture

StatusFileSize
new804 bytes

Hi,
I also ran into this bug, and got around it by stopping the "Report as offensive" link from appearing on nodes or comments that the user owns. I've attached a patch, although I'm not sure if this is the best solution to the problem.

Rohan

shipal’s picture

1. Yup I was trying to flag contents that I created (coz it's a new site and I'm the only user right now).

2 & 3. Yes to both.

Is it possible to pop up an alert or something instead of giving a 404?

Thanks !

btmash’s picture

I'll take a look through the code to see where the check goes faulty (its not supposed to be showing the link to the user's own content) and devise a patch for it (thanks for your preliminary patch, Azzor - I'm assuming this also breaks for anonymous user created content - something I had not thought about).

I'll change the flow to send the user back to the page with the content with a message that they cannot report on their own content.

btmash’s picture

I've updated the module with the patch - should be available with the next release. Please notify if there are still problems.

preferred name’s picture

The error still continues with or without the patch applied. So far what i did was create a test user account and then flagged one of the admin comments. after the flag i was sent to a 404 page not found.

mikegull’s picture

Looks like an issue with it doing drupal_goto($object->link), when link is the result of a l() call. The 404'ed URL includes a url-encoded "path), I think. Debugging now, see if I can figure out a patch....

mikegull’s picture

Category: support » bug
Status: Active » Needs review
StatusFileSize
new1.43 KB

Patch to switch ->path for ->link, works on our site, YMMV.

btmash’s picture

Thanks for your patch, Mike. I incorporated a few other things with your patch as well as the issue seemed to be stemming from the comment flagging. Should be out with the next release.

btmash’s picture

Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)