• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Problem with hard-deleted media

imthebest

Well-known member
#1
Hi,

Today I hard-deleted a media and because I wanted to be sure that the media in fact got hard-deleted (and also because I know that everything coded by Chris always comes with surprises :p) I accessed it manually by entering the URL in the address bar and got the following error message: "You do not have permission to view this page or perform this action."

That message seems to indicate a problem because if the media got hard-deleted I should get something like "Media doesn't exists".

If I logout from my admin account and try to access the hard-deleted media via direct URL as a guest I get the correct error message: "The requested page could not be found." but...

...interestingly after a few minutes still as a guest if I try to access to the hard-deleted media now I'm asked to login and if I login (be it as a regular member or as admin) I get: "You do not have permission to view this page or perform this action."

Thanks,
Super120
 
Last edited:

Chris D

XenForo developer
Staff member
#2
I know that everything coded by Chris always comes with surprises :p
That's not particularly funny.

"You do not have permission to view this page or perform this action."

That message seems to indicate a problem because if the media got hard-deleted I should get something like "Media doesn't exists".
There isn't a "problem" as such. No error message is passed to that particular response, so it renders the default permission error so, it's basically expected. I will however fix this to make the error more clear.

If I logout from my admin account and try to access the hard-deleted media via direct URL as a guest I get the correct error message: "The requested page could not be found." but...

...interestingly after a few minutes still as a guest if I try to access to the hard-deleted media now I'm asked to login and if I login (be it as a regular member or as admin) I get: "You do not have permission to view this page or perform this action."
I cannot reproduce the "requested page could not be found" error. That would only happen if you got the route wrong, maybe you accidentally altered another part of the URL. The code will only ever return the permission error.
 

imthebest

Well-known member
#3
Thanks Chris and well my comment ended with a smiley and I was just kidding, it wasn't my intention to offend you. Sorry about that anyway.