Closed (fixed)
Project:
Hidden
Version:
5.x-2.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
28 Dec 2007 at 12:54 UTC
Updated:
7 Jan 2008 at 10:36 UTC
Jump to comment: Most recent file
After reporting content that should be hidden, a regular authenticated user is redirected to hidden/node/1976 (where 1976 is the node ID), which is access denied for non-admins (and page not found for admins).
The path I got redirected to: http://wsf.grassrootsconnection.org/es/hidden/node/1976
This is a multilingual site but I don't think that's introducing the error.
I think it should just redirect back to the reported node? I can make a patch but I am looking to make sure I have your intentions correct.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | hidden.20080102.patch | 6.72 KB | ekes |
| #3 | hidden.20071230.patch | 5.35 KB | ekes |
| #2 | hidden_report_redirect.patch | 443 bytes | mlncn |
Comments
Comment #1
ekes commentedYes. If the node/comment is just being reported it should return to the page it came from with a drupal_set_message confirming that it has been reported.
If you have time to make a patch it would be great, if not I'll do it.
Cheers!
Comment #2
mlncn commentedThe logic here appears reversed. This is the way it is now:
But it's people who don't have hidden access who should be directed back to the node, like so:
So the attached patch fixes that. However...
1. In most situations, people should be redirected back to the node regardless of their access.
2. I don't think hidden/$type/$id actually gets you anywhere-- there's no there, there. I think it's only part of a path
_hidden_goto_hidden is taking in too much for me to figure this out though.
Comment #3
ekes commentedYes the _hidden_goto_hidden was getting unnecessarily complicated dealing with (or trying to deal with) both hide and report redirects. I've simplified it using more of the drupal inbuilt goto functions. I've left in, but commented, the slightly complicated logic testing if cid===NULL, it is also redundant now - it was intended for times when you call but don't know the nid - I'll check to see if it is a future posibility.
I'll review the code when I've not got a horrid cold and related slow brain. But if you can test the patch that would be cool.
Comment #4
ekes commentedOK a clear headed patch, with a mind on making redirects flexible in the future too
Comment #5
ekes commentedCommitted to DRUPAL-5--2 will be in next -dev created and I'll make a bug fix release as well soon.
Comment #6
mlncn commentedAwesome.
Comment #7
mlncn commented(Apparently, hitting reload on a page like this, that's been open in one's browser window a couple days, will add new comments, but leave form values as they are. Setting back to fixed!)
Comment #8
ekes commentedFix in release 5.x-2.1