cancel
Showing results for 
Search instead for 
Did you mean: 

Override Error Message

danniemstanley
Champ in-the-making
Champ in-the-making
Running Alfresco Community 2.1.  I have configured JAAS for auth and LDAP for user import.  When a user authenticates but doesn't have an Alfresco user (we restrict access to a certain LDAP group) we correctly get denied access.  The error message is:

The Home Space node referenced by Id: 17…742 cannot be found. It may have been deleted from the database. Please contact your system administrator.

This is the desired behavior.  However I was wondering if we could override the error message itself to be specific for our users.  For example:

Please contact Information Systems to gain access to this service. Thank you.
3 REPLIES 3

kevinr
Star Contributor
Star Contributor
Yes you can override this message, the ID is:

error_homespace

and it can be found in the webclient.properties file. You can use the standard overriding mechanism for this file:
http://wiki.alfresco.com/wiki/Adding_Custom_I18N_Strings

Thanks,

Kevin

danniemstanley
Champ in-the-making
Champ in-the-making
So the page showing the error is:

   /alfresco/faces/jsp/login.jsp

So I assume that I need to follow the instructions located under heading:  Using custom strings in JSPs on wiki page: http://wiki.alfresco.com/wiki/Adding_Custom_I18N_Strings

I am not familiar with JSF.  From what I gather you are replacing the JSP file with your own custom JSP file.  That seems prone to break during upgrades.  So to me this looks like quite an involved process.  It is good to know that it *can* be done.

kevinr
Star Contributor
Star Contributor
You do not need to override the JSP file. The statement on the wiki:

A webclient.properties file can now be placed in the alfresco.extension package. This will be automatically picked up by the web client, except for JSPs.

Is a little confusing, what is should read is:

A webclient.properties file can now be placed in the alfresco.extension package. This will be automatically picked up by the web client, except for messages display via JSF message tags in JSPs.

Fortunately that error message comes from a bean not from a JSF message tag, so you can override it with a custom webclient.properties file placed in alfresco/extension.

Thanks,

Kevin