You don't have permission to access this. Please contact a website administrator if this is incorrect. Topic is solved
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
-
- Joomla! Enthusiast
- Posts: 142
- Joined: Wed Aug 11, 2021 12:44 pm
You don't have permission to access this. Please contact a website administrator if this is incorrect.
Hi all, I am a beginner in Joomla and was getting this error (error is subject) every time I login as a user on my website. I have linked the images of the error and attached my Login function code as login.txt. I do not know why the alert is popping up even after a successful login and would like to prevent it from showing. Appreciate everyone that takes the time to read this and have a great day
- Image of the error -
https://prnt.sc/1sjlnqn
- Image of the error -
https://prnt.sc/1sjlnqn
You do not have the required permissions to view the files attached to this post.
- AMurray
- Joomla! Exemplar
- Posts: 9711
- Joined: Sat Feb 13, 2010 7:35 am
- Location: Australia
Re: You don't have permission to access this. Please contact a website administrator if this is incorrect.
It seems there's something without the correct permissions e.g. a module or something and that's what the errors alerting you for. You can't just 'turn if off' without figuring out the problem.
Are you logging on with a full super user or something else?
Is the 'login function code' something you created or is it Joomla system code?
Are you logging on with a full super user or something else?
Is the 'login function code' something you created or is it Joomla system code?
Regards - A Murray
General Support Moderator
General Support Moderator
-
- Joomla! Enthusiast
- Posts: 142
- Joined: Wed Aug 11, 2021 12:44 pm
Re: You don't have permission to access this. Please contact a website administrator if this is incorrect.
I am logging in with a super user account but the same thing occurs. Yes, the login function code is written by me. Could it be something wrong with my login function code?
- Per Yngve Berg
- Joomla! Master
- Posts: 30892
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: You don't have permission to access this. Please contact a website administrator if this is incorrect.
Why are you coding a login function? What are you trying to achieve?
-
- Joomla! Enthusiast
- Posts: 142
- Joined: Wed Aug 11, 2021 12:44 pm
Re: You don't have permission to access this. Please contact a website administrator if this is incorrect.
So that I can change my state to login? and users that are logged in have access to more featuresPer Yngve Berg wrote: ↑Fri Sep 17, 2021 2:59 pmWhy are you coding a login function? What are you trying to achieve?
- Pavel-ww
- Joomla! Ace
- Posts: 1618
- Joined: Tue Jun 30, 2020 12:17 pm
Re: You don't have permission to access this. Please contact a website administrator if this is incorrect.
Hi. Check the owner of the site's files on the server. For example, this often happens when using VPS/VDS when you manipulate the files under the root user, instead of using the domain user. (just happened to me )
-
- Joomla! Enthusiast
- Posts: 142
- Joined: Wed Aug 11, 2021 12:44 pm
Re: You don't have permission to access this. Please contact a website administrator if this is incorrect.
Thanks, for the quick reply.
Ok so I just have to check who is the owner of the file and can you guide me on what should I do after that?
- Pavel-ww
- Joomla! Ace
- Posts: 1618
- Joined: Tue Jun 30, 2020 12:17 pm
Re: You don't have permission to access this. Please contact a website administrator if this is incorrect.
If the owner is not the right user, you need to change it to the right one. It can be done by bunch, for all files and folders. Specific functionality depends on the hosting panel.
- ceford
- Joomla! Hero
- Posts: 2654
- Joined: Mon Feb 24, 2014 10:38 pm
- Location: Edinburgh, Scotland
- Contact:
Re: You don't have permission to access this. Please contact a website administrator if this is incorrect.
Do you have a login menu item? Set the Login redirect to the Home page menu item. Same for the Logout redirect. Same if you are using a module to login - set the Login and Logout redirection pages. Tell us if that fixes the message.
-
- Joomla! Enthusiast
- Posts: 142
- Joined: Wed Aug 11, 2021 12:44 pm
Re: You don't have permission to access this. Please contact a website administrator if this is incorrect.
Thank you good sir! this solves it for me
I went and set the login and logout menu item to redirect to the home page and the message is gone. But I would like to understand and learn how does doing this fixes this problem.
- ceford
- Joomla! Hero
- Posts: 2654
- Joined: Mon Feb 24, 2014 10:38 pm
- Location: Edinburgh, Scotland
- Contact:
Re: You don't have permission to access this. Please contact a website administrator if this is incorrect.
To find the problem:But I would like to understand and learn how does doing this fixes this problem.
First find the error message in the language ini files - you will find this one in joomla.ini - and that gives you the key to look for in the code - JERROR_ALERTNOAUTHOR.
Then look for that key in the php code. You will find it in several places. In this case it is libraries/src/Application/SiteApplication.php on line 120 that is relevant.
Then read the code: the function is checking you are authorised to access a menu item. You are not even though you are logged in. So the error message is queued and you are redirected to the home page. That means there may be something wrong with your own code or you have forgotten to redirect to an authorised menu item, for example if you are trying to stay on the Edit Profile page after logout.
-
- Joomla! Enthusiast
- Posts: 142
- Joined: Wed Aug 11, 2021 12:44 pm
Re: You don't have permission to access this. Please contact a website administrator if this is incorrect.
I understand now. Thank you so muchceford wrote: ↑Sat Sep 18, 2021 12:44 pmTo find the problem:But I would like to understand and learn how does doing this fixes this problem.
First find the error message in the language ini files - you will find this one in joomla.ini - and that gives you the key to look for in the code - JERROR_ALERTNOAUTHOR.
Then look for that key in the php code. You will find it in several places. In this case it is libraries/src/Application/SiteApplication.php on line 120 that is relevant.
Then read the code: the function is checking you are authorised to access a menu item. You are not even though you are logged in. So the error message is queued and you are redirected to the home page. That means there may be something wrong with your own code or you have forgotten to redirect to an authorised menu item, for example if you are trying to stay on the Edit Profile page after logout.