Loading...
 
Features / Usability

Features / Usability


Is there a way to change an Error message?

posts: 19 Netherlands

Hi,

Got my home page set up in a way that it's not accessible for general public (anonymous).
When someone goes to my home page they get this message:
"!Error
You do not have permission to view this page"

Is there a way to change that message? Where should I go to put in my own?

Please and thank you :-)



Screenshot attached.

posts: 4656 Japan

Hi,

The easiest way is probably to use Tiki's method for language customization. See https://doc.tiki.org/Interface-translation#Translation_through_Tiki_interface_database_. What you would do is specify English as the language to add new translations to. The current error message would go in the left column (the default text) and your new version would go in the right column (if I recall correctly - I haven't looked at the admin page in a while).

The downside of this method is that every instance of the "You do not have permission to view this page" text at your site will be replaced with your new translation, so you would need to come up with phrasing that is appropriate not only for the homepage but for all pages that people without permission can't see. It may be possible to change the error message for a specific page, but if so I don't know what it is.

Alternatively, you could set up group-specific homepages. You can edit the properties of each group at your site, and specify their homepages, so this may get around the problem of having the non-viewable page and its error message.

-- Gary


posts: 19 Netherlands

Hi,

Well... I just don't want anyone to be able to get through the 1st page without logging in. After that I know I can control permissions for each page. It's just that 1st one that is a problem. That's why I thought not to
bother much, just change the error message and job done... :-) ... Going into translations, however, seems like digging too deep. The more complex things become the more can go wrong :-)! and I want to keep things as simple as they can get.

Question.
Is it possible to set up two home pages? One for general public (anonymous) and one that would open when someone logs in?

I think that would be the easiest and so please let me know if you can

Thanking you :-) and looking forward

posts: 2428 Czech Republic

Hi yuki,
welcome to the Tiki world. Yes, it is totally possible to have different home page for Anonymous and for logged in (Registered) or any other group. Just enable "Use group homepages" preference ( tiki-admin.php?lm_criteria=Use+group+homepages ) and use this feature: https://doc.tiki.org/Groups-Management?highlight=Group+Homepages#Changing_group_Settings

For the custom error messages I would actually rather use custom error pages for status 403 (see the section # — Apache Error Handling — # in your .htaccess file) or "Redirect on error" preference:

https://doc.tiki.org/Redirect+On+Error (please improve the docs if you can)

You can also alternatively just display the login form on permission denied:
"On permission denied, display login module"

or use the field for

"The URL that the anonymous user is redirected to when a page is not found"

You can find all these settings on the General control panel below the "Redirect on error": tiki-admin.php?page=general&cookietab=3&highlight=feature_redirect_on_error

HTH,
luci

posts: 8633 Israel
luciash d' being 🧙 wrote:
You can find all these settings on the General control panel below the "Redirect on error": tiki-admin.php?page=general&cookietab=3&highlight=feature_redirect_on_error


I like the idea of using a Wiki page as 404 and I used it for some sites (I should for https://bsfez.com (!) :-)
Once you do there is no limit to the way to help your users to find their way and avoid losing traffic.