When every page is hidden bottom_js.jspf breaks

Description

Once LPS-15921 has landed is now possible to make hidden every layout in a layoutSet.

This leads to a layouts==null and bottom_js.jspf tries to iterate over it.

The iteration can be found on https://github.com/liferay/liferay-portal/blob/master/portal-web/docroot/html/common/themes/bottom_js.jspf#L127.

Incriminated code is here: https://github.com/liferay/liferay-portal/blob/master/portal-impl/src/com/liferay/portal/events/ServicePreAction.java#L1654

As you'll see if viewableLayouts.isEmpty() then yelds to null. This value is not always sanitized to an empty ArrayList<Layout> as we might expect.

Activity

Show:

Michael SaechangAugust 30, 2012 at 4:30 PM

Thank you Paul for testing. Closing as 'Fixed'.

Paul PiaoAugust 29, 2012 at 11:18 PM

PASSED Manual Testing using the following steps:

  1. create site with 1 page.

  2. then change "Hidden" flag for this page to "true".

  3. refresh page.

Reproduced on:

Tomcat 7.0 + MySQL 5. Portal 6.1.10 EE GA1.

In console throw NPE error message.

Fixed on:
Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: 75eea5b6d07187864739026a062a8df59a8e293a.
Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 2535a9d2ab54681588cc4db57088f4dc3f65844a.

In console is not throw NPE error message and hidden page is working.

Michael SaechangAugust 28, 2012 at 2:56 PM

committed on:
Portal 6.1.x CE GIT ID: d48cd4902cccc96497141de312ee688417f2eb3e.
Portal 6.2.x GIT ID: f99a366ca17a101b4665dfca501a86cb22334470.

Michael SaechangAugust 28, 2012 at 2:55 PM

has fixed this issue.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Labels

Branch Version/s

6.1.x

Backported to Branch

Committed

Fix Priority

3

Git Pull Request

Bug Type

Regression Bug

Components

Priority

Zendesk Support

Created April 16, 2012 at 9:49 AM
Updated June 24, 2023 at 3:54 PM
Resolved August 28, 2012 at 2:56 PM