<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Modifying Login to change error message in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/modifying-login-to-change-error-message/m-p/292564#M245694</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;Hi jlaramie9,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;&amp;nbsp; I am also trying to change login error messages depends up on condition.if it is working successful can you please explain the steps.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Nov 2016 07:55:18 GMT</pubDate>
    <dc:creator>yroopa1229</dc:creator>
    <dc:date>2016-11-11T07:55:18Z</dc:date>
    <item>
      <title>Modifying Login to change error message</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modifying-login-to-change-error-message/m-p/292559#M245689</link>
      <description>I've been working with Alfresco Community adapting it to my company needs for a couple months with the help of a lot of great information from this forum but I've hit a wall.&amp;nbsp; We are looking to show specific error messages on the login page when a user has not been successful.&amp;nbsp; I copied the LoginPos</description>
      <pubDate>Fri, 27 Sep 2013 17:42:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modifying-login-to-change-error-message/m-p/292559#M245689</guid>
      <dc:creator>jlaramie9</dc:creator>
      <dc:date>2013-09-27T17:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Login to change error message</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modifying-login-to-change-error-message/m-p/292560#M245690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As I can see &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LoginPost class is the web script controller for "login.post" webscript in Alfresco tier, in this class, when an error presents, WebScriptException is catched and webscript is redirected to a standard status template, in the following lines:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;try&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; return login(username, password);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;catch(WebScriptException e)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; status.setCode(e.getStatus());&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; status.setMessage(e.getMessage());&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; status.setRedirect(true);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /********** HERE *********/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; return null;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Status templates in webscripts allow to present errors easy without having to create error presentation in FTL templates. So&amp;nbsp; login.post.json.ftl is never called, and as you can see there are no information in your FTL about this error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You have 2 options here, in the code instead call status templates you can create an "errorMessaje" in model Map to recover this in login.post.json.ftl, but remember a good practice in Alfresco is never change code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another option is in Share in login page that is calling this webscript you could validate this JSON response, the main part in status templates is the following element: "message" : "08270001 Invalid Credentials", so you could manipulate or create a custom error message in Share based in this "message" element.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Making some tests I've checked that only 2 error messages could be returned from this webscript in Share login calls.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 1. "message" : "08300006 Username not specified"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 2. "message" : "08300007 Login failed"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope it helps!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Diego.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Sep 2013 18:19:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modifying-login-to-change-error-message/m-p/292560#M245690</guid>
      <dc:creator>zannafar</dc:creator>
      <dc:date>2013-09-30T18:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Login to change error message</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modifying-login-to-change-error-message/m-p/292561#M245691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Diego,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your reply!!!&amp;nbsp; I was trying to do your option 2, manipulate the error based on the "message" element, and had no success.&amp;nbsp; Would I do the validate/manipulation in login.post.json.ftl?&amp;nbsp; I tried getting the element in login.get.js and login.get.html.ftl.&amp;nbsp; I also tried making the "message" element be an argument to the page via the slingshot-login.xml but had no luck.&amp;nbsp; Would I just manipulate the login.post.json.ftl in the templates… directory?&amp;nbsp; Or can I copy it inside of the shared/extension and make changes there?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again for your help!!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jim&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Sep 2013 19:29:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modifying-login-to-change-error-message/m-p/292561#M245691</guid>
      <dc:creator>jlaramie9</dc:creator>
      <dc:date>2013-09-30T19:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Login to change error message</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modifying-login-to-change-error-message/m-p/292562#M245692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If I understand it corrrectly, You want to disaply custom error message when user fails to login in Share UI and so you are extending alfresco webscript LoginPost just for your custom error message.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If its a static message for all possible scenarios then you can directly change message.loginautherror in customslingshot.properties which is geting displayed from login.get.html.ftl&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hop this help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Oct 2013 13:46:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modifying-login-to-change-error-message/m-p/292562#M245692</guid>
      <dc:creator>niketapatel</dc:creator>
      <dc:date>2013-10-01T13:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Login to change error message</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modifying-login-to-change-error-message/m-p/292563#M245693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi jlaramie9,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry for the question, I have some doubts about your post and I want to make sure what your problem is to help you better.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you using Alfresco Share login page? Is the Share login error message generic for you? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Do you want to change the label of this error message?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Or do you want to split this error message?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When you use Share login you do the following steps in background&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Alfresco share login page (server:8080/share), clik en submit button&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Alfresco redirects to dologin page (server:8080/share/dologin)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Dologin page calls login webscript in Alfresco tier&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4. If success login, server redirect to server:8080/share/page, you are authenticated in Share!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; If no success login, servevr redirec to login page with error variable in URL (server:8080/share/page/type/login?&amp;lt;strong&amp;gt;error=true&amp;lt;/strong&amp;gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;5. In login page if error URL variable exist it show in bubble message: "The remote server may be unavailable or your authentication details have not been recognized."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, if you want to change yo have to change dologin source class. I think this could be a complicated job. I would recommend to apply some validations in login page with JS client side, for example: if username text box is leaved blank disable submit button.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As niketapatel said, you could change the label of error popup modifying slingshot.properties in share/WEB-INF/classes/alfresco/messages or you could create a new .properties file with your custom labels.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope it helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Take care,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Diego.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Oct 2013 22:38:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modifying-login-to-change-error-message/m-p/292563#M245693</guid>
      <dc:creator>zannafar</dc:creator>
      <dc:date>2013-10-01T22:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Login to change error message</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modifying-login-to-change-error-message/m-p/292564#M245694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;Hi jlaramie9,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;&amp;nbsp; I am also trying to change login error messages depends up on condition.if it is working successful can you please explain the steps.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 07:55:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modifying-login-to-change-error-message/m-p/292564#M245694</guid>
      <dc:creator>yroopa1229</dc:creator>
      <dc:date>2016-11-11T07:55:18Z</dc:date>
    </item>
  </channel>
</rss>

