Error output but html page source system-message-container is empty. Topic is solved

General questions relating to Joomla! 3.x.

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.
Post Reply
bobinski
Joomla! Intern
Joomla! Intern
Posts: 81
Joined: Mon Aug 26, 2019 12:24 pm
Contact:

Error output but html page source system-message-container is empty.

Post by bobinski » Wed Oct 09, 2019 12:38 pm

I have a menu item on my main menu which is a link to /submit-an-article.

When the user does not have that permission my home page springs to life and an error message is output that says 'Error You are not authorised to view this resource.'

The page source shows an empty system-message-container :-

Code: Select all

<div id="system-message-container"></div>
How do I test for the error message so that I can take appropriate action?

Maybe I just need to grey out the menu item!

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11455
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Error output but html page source system-message-container is empty.

Post by toivo » Wed Oct 09, 2019 1:22 pm

First of all, instead of thinking about greying out the menu item, design the viewing access levels of your user groups, especially authors and editors, in such a way that you can set the viewing access level of that menu item and make it visible only to the authorised user group or user groups.

Then, if unauthorised users or visitors to the website know or correctly guess the link and enter it manually, they will see the message "You are not authorised...".

Which template are you using?

Please post the results from the Forum Post Assistant (FPA) by following the instructions from https://forumpostassistant.github.io/docs/.
Toivo Talikka, Global Moderator

bobinski
Joomla! Intern
Joomla! Intern
Posts: 81
Joined: Mon Aug 26, 2019 12:24 pm
Contact:

Re: Error output but html page source system-message-container is empty.

Post by bobinski » Wed Oct 09, 2019 9:30 pm

toivo wrote:
Wed Oct 09, 2019 1:22 pm
First of all, instead of thinking about greying out the menu item, design the viewing access levels of your user groups, especially authors and editors, in such a way that you can set the viewing access level of that menu item and make it visible only to the authorised user group or user groups.
I now have done that and the situation is much improved; the menu item only exists for those who can use it, Thanks @toivo.

toivo wrote:
Wed Oct 09, 2019 1:22 pm
Then, if unauthorised users or visitors to the website know or correctly guess the link and enter it manually, they will see the message "You are not authorised...".
I get the error 'Please login first'

toivo wrote:
Wed Oct 09, 2019 1:22 pm
Which template are you using?
protostar

toivo wrote:
Wed Oct 09, 2019 1:22 pm
Please post the results from the Forum Post Assistant (FPA) by following the instructions from https://forumpostassistant.github.io/docs/.
I would be happy to do that if I had a local copy of my site. I did start that process but never finished!
I'm not putting that script on a publicly accessible server due to the severe risk of hacking it warns about!

I now have an error message that has not been cleared(?) but I now never get to a screen where I can clear it!

This is when I log in on any user - even super user.
Last edited by bobinski on Wed Oct 09, 2019 9:34 pm, edited 1 time in total.

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8009
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Error output but html page source system-message-container is empty.

Post by sozzled » Wed Oct 09, 2019 9:32 pm

Just a quick comment about the FPA script being used on a public website. It's not a "severe risk"; it's a general disclaimer. Use it, obtain the report and then remove it.
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

bobinski
Joomla! Intern
Joomla! Intern
Posts: 81
Joined: Mon Aug 26, 2019 12:24 pm
Contact:

Re: Error output but html page source system-message-container is empty.

Post by bobinski » Wed Oct 09, 2019 11:34 pm

If I have the login menu item with access of Guest I get the error.
If I set the access to Public, I get a menu item I don't want.

Hmmm, catch 22!

It would be really nice to know which resource it means, or know what php to put in the logout or login thread to clear the error message.

bobinski
Joomla! Intern
Joomla! Intern
Posts: 81
Joined: Mon Aug 26, 2019 12:24 pm
Contact:

Re: Error output but html page source system-message-container is empty.

Post by bobinski » Thu Oct 10, 2019 3:19 am

Basically the login form module needs Public Access menus. When I finally got my head round toivo's answer and used the module in one of the template's positions, rather than trying to use it directly from menus, all then works without error messages.


Post Reply

Return to “General Questions/New to Joomla! 3.x”