Tuesday 28 July 2009

Liferay theme problem

A while ago we were getting some issues reported from users that wew seeing some strange screens when accessing our Liferay portal. Although they saw most of the data we expected them to see, it wasn't presented properly, as if no theme was being applied. Looking in the logs didn't turn up anything useful and since I didn't see it with my own eyes I instructed the user that reported the error to email me a screenshot when it happened again.


So fast forward to today and I get an email with a screenshot. The screen is pretty white generally, but contains all the data, text and images, that I would expect on that given page, but it looks like no theme at all is applied. It check it for myself using Firefox, the user that reported the problem is using IE and you never know, and low and behold, I get the same fucked up page. So immediately I dive into the logs again, but still nothing.


So what could it be, maybe the portal thinks it is being accessed by a mobile device and presents a simpler theme? But that doesn't really make sense since both the user and I are using desktop browsers. Still I check the theme settings on the portal using the 'Manage Pages' part of the dock, but everything seems to be in order. So next step, check Google. And there we find something interesting, a caching problem: LPS-2834. This issue describes exactly what we are experiencing since after a few refreshes in my browser I get the correctly rendered portal page again. So it seems that something gets cached when a mobile device accesses the portal, but that this cached result is also returned when a non mobile browser requests the same content.


So we could apply the patch that is attached to the issue, but we'll probably use this issue as an excuse to do an upgrade to Liferay Portal 5.2.2 as this will solve this bug and some other problems we're having with our current Liferay Portal 5.1.1 on which I may or may not elaborate in the future.


No comments:

Post a Comment