Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Liferay 7: Liferay language selector portlet fails when in review mode #3978
So what should happen in this case? I have French as default language now.
Say the form's
When the language selector is clicked to "English", that portlet loads a side-effecting path to change the language:
The response to that is a 302 redirection to:
This is almost the same path as the starting path, except that there is no
During that first language change, the
Now, when I do a "Review", an action URL happens, which is double-pass submission happens and an HTTP POST happens. Changing the language after that follows the same process as above, and a GET is issued for that URL.
Now, the proxy portlet is supposed to cache results coming from actions. So we need to see if this behavior is a bug of that mechanism, or due to something else.
Logic of actions in our portlet:
case class ResponseWithParameters( response : BufferedContentOrRedirect, parameters : Map[String, List[String]] )
This suggests that, possibly, we don't have the same parameters and the comparison of parameters fails?
The POST has:
And the GET:
The parameters (
Form Runner receives a
This said, even if action caching worked in the portlet, the Form Runner language wouldn't change at that time. But that would certainly be better than crashing.
Ah, noting that upon an action, we store
In general the method makes a difference, but it sounds like we should handle the special case of
It turns out that there is more. When we change the language on the