-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.0.X, 7.1.X, 7.2.X, Master
-
Fix Version/s: 7.0.0 DXP FP92, 7.0.10.14 DXP SP14, 7.0.X, 7.1.10 DXP FP18, 7.1.10.5 SP5, 7.1.X, 7.2.10 DXP FP5, 7.2.10.2 DXP SP2, 7.2.X, 7.3.1 CE GA2, 7.3.2 CE GA3, 7.3.10 DXP GA1, Master
-
Component/s: ~[Archived] WCM
-
Branch Version/s:7.2.x, 7.1.x, 7.0.x
-
Backported to Branch:Committed
-
Fix Priority:3
-
Git Pull Request:
- Set up and start a portal
- Create a new site called 'customer'
- Create a random page for it, to be able to access http://localhost:8080/web/customer
- Place a Language Selector portlet onto it
- Set the home URLs: Control Panel > Instance settings > Instance Configuration > General > Set Home URL + Default Logout Page + Default Landing Page to /es/web/customer
- Open an incognito window and go to http://localhost:8080/ (this should show the Spanish version of the site)
- Select another language in Language Selector (Selector de Idioma)
Expected result: no error thrown, the portal switches to the selected language
Actual result: Error page is shown, Exception in the logs:
2020-02-02 18:46:02.312 WARN [http-nio-8080-exec-8][PortalImpl:6566] javax.servlet.ServletException: java.lang.StringIndexOutOfBoundsException: String index out of range: -2 javax.servlet.ServletException: java.lang.StringIndexOutOfBoundsException: String index out of range: -2 at com.liferay.portal.struts.PortalRequestProcessor._process(PortalRequestProcessor.java:428) at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:155) at com.liferay.portal.internal.servlet.MainServlet.doGet(MainServlet.java:205) ... at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -2 at java.lang.String.substring(String.java:1931) at com.liferay.portal.action.UpdateLanguageAction.execute(UpdateLanguageAction.java:121) at com.liferay.portal.struts.PortalRequestProcessor._process(PortalRequestProcessor.java:415) ... 92 more
- demands
-
LPS-106477 Requested resource not found for asset friendly url after changing language
- Closed
-
LPS-110167 FriendlyURL is not always complete after switching language
- Closed