NullPointerException in AssetPublisher's RSSAction

Description

Hi.

I've found a problem in the RSS part of the Asset Publisher. In com.liferay.portlet.assetpublisher.action.RSSAction at line 231, the variable viewInContextURL can be null. This is the case for me at the moment. An NPE is thrown, but don't come up in the logs or other places (it's because of the try {} finally {} construct in com.liferay.portlet.assetpublisher.action.RSSAction#serveResource) . The result is an empty response. A simple check, if vieInContextURL is null works for me.

The asset publisher is configured as follows:

  • Asset selection: dynamic

  • Scope to default Site

  • Asset Type: Web Content

    • Web Content Subtype: One of our structures

  • Filter should not contain one tag (out of the Global scope)

  • Display Style: A custom display style

  • Asset Link Behaviour: View in specific portlet

  • Maximum Items to display: 10

  • Pagination Type: One of our custom pagination types

  • Show Metadata Descriptions

  • Set as the Default Asset Publisher for This Page

  • Enable RSS Subscription:

  • RSS Feed Name: Press Releases

  • Maximum items to display: 20

  • Display Style: abstract

  • Format: RSS2.0

The "patched" class is attached.

Attachments

1

Activity

Show:

Paul Piao August 13, 2012 at 8:03 PM
Edited

PASSED Manual Testing using the following steps:

  1. Add Web Content (Use Structures and Template and Categories)

  2. Add Asset Publisher portlet.

  3. Go to configuration in Asset Publisher portlet.

    • Asset selection: dynamic

    • Scope to default Site

    • Asset Type: Web Content

      • Web Content Subtype: One of our structures

    • Filter should not contain one tag (out of the Global scope)

    • Display Style: A custom display style

    • Asset Link Behaviour: View in specific portlet

    • Maximum Items to display: 10

    • Pagination Type: One of our custom pagination types

    • Show Metadata Descriptions

    • Set as the Default Asset Publisher for This Page

    • Enable RSS Subscription:

    • RSS Feed Name: Press Releases

    • Maximum items to display: 20

    • Display Style: abstract

    • Format: RSS2.0

  4. Click RSS.

Reproduce on:

Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 4d0154f199dac752514b9e8c0fb31852630a7364.

You will see the "XML Parsing Error:".

Fixed on:
Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: 287ae5f5afe96b20821be8405dd5ec861983cd51.
Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 8800707c2df3e12b5ae39e46e5676cf31f28bb64.

You will see the RSS URL is working.

Michael Saechang July 11, 2012 at 3:01 PM

Committed on:
Portal 6.1.x CE GIT ID: b069e3fefd26e73394907b06e02e2d0d5c4c4f1c.
Portal 6.2.x GIT ID: 544497438c34de341e5970b4f15f4465f56170e8.

Fixed

Details

Assignee

Reporter

Labels

Branch Version/s

6.1.x

Backported to Branch

Committed

Components

Affects versions

Priority

Zendesk Support

Created June 13, 2012 at 10:24 AM
Updated June 24, 2023 at 4:01 PM
Resolved June 13, 2012 at 3:13 PM
Loading...