Pluto
  1. Pluto
  2. PLUTO-496

When portlet.xml has resource-bundle defined with package containing empty messages.properties, it uses portlet-info title and short-title from portlet.xml, which is inconsistent with earlier versions of pluto

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.1.5
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Description

      When portlet.xml has resource-bundle defined with a package containing an empty messages.properties file, it appears to use the portlet-info title and short-title from portlet.xml (tested with pluto 1.1.5 in uPortal 3.0.1).

      While that doesn't seem that bad, if it is ignoring an empty messages.properties file or ignoring the resource-bundle altogether and this is not compliant with the standard, that might be bad.

      Eric Dalquist of uPortal mentioned that this behavior, seemingly introduced somewhere between pluto 1.0.1-rc2 and pluto 1.1.5, could be a bug, since in earlier versions of pluto (tested with 1.0.1.-rc2 in uPortal 2.5.3.1 GA) it would fail to load if the the portlet's resource-bundle was defined with a package containing an empty messages.properties file, even if the title and short-title was defined in portlet-info.

      Here is the example portlet.xml that works with pluto 1.1.5 (even though maybe it shouldn't?) but doesn't work with pluto 1.0.1-rc2:
      (put an empty messages.properties file in the package that it defines as the resource-bundle, which in this example is jasig.portlet.helloworld.MyPortlet)

      <?xml version='1.0' encoding='UTF-8' ?>
      <portlet-app xmlns='http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd' version='1.0'>
      <portlet>
      <description>MyPortlet</description>
      <portlet-name>MyPortlet</portlet-name>
      <display-name>MyPortlet</display-name>
      <portlet-class>jasig.portlet.helloworld.MyPortlet</portlet-class>
      <expiration-cache>0</expiration-cache>
      <supports>
      <mime-type>text/html</mime-type>
      <portlet-mode>VIEW</portlet-mode>
      <portlet-mode>EDIT</portlet-mode>
      <portlet-mode>HELP</portlet-mode>
      </supports>
      <resource-bundle>jasig.portlet.helloworld.messages</resource-bundle>
      <portlet-info>
      <title>MyPortlet</title>
      <short-title>MyPortlet</short-title>
      </portlet-info>
      </portlet>
      </portlet-app>

        Activity

        Gary S. Weaver created issue -
        Hide
        Gary S. Weaver added a comment -

        Note: Eric Dalquist said he's not sure whether that Pluto is responsible for this behavior or whether uPortal 3 is because he didn't have a chance to check it yet. I misunderstood him when he said, "This may be a bug in Pluto 1.1" to mean that it was probably a bug in Pluto, but he said that filing a bug may have been premature. Sorry to bother, and only check this out if you have time. It isn't affecting us since there are two workarounds:

        1) Just remove the resource-bundle from portal.xml.
        2) Make sure the properties are defined in messages.properties in the resource package defined by the value of the resource-bundle element. For example:

        javax.portlet.title=Hello World Portlet
        javax.portlet.short-title=Hello World
        javax.portlet.keywords=portlet,hello,world

        Thanks for your help, and sorry again for the trouble.

        Show
        Gary S. Weaver added a comment - Note: Eric Dalquist said he's not sure whether that Pluto is responsible for this behavior or whether uPortal 3 is because he didn't have a chance to check it yet. I misunderstood him when he said, "This may be a bug in Pluto 1.1" to mean that it was probably a bug in Pluto, but he said that filing a bug may have been premature. Sorry to bother, and only check this out if you have time. It isn't affecting us since there are two workarounds: 1) Just remove the resource-bundle from portal.xml. 2) Make sure the properties are defined in messages.properties in the resource package defined by the value of the resource-bundle element. For example: javax.portlet.title=Hello World Portlet javax.portlet.short-title=Hello World javax.portlet.keywords=portlet,hello,world Thanks for your help, and sorry again for the trouble.
        Gary S. Weaver made changes -
        Field Original Value New Value
        Priority Major [ 3 ] Minor [ 4 ]
        Mark Thomas made changes -
        Workflow jira [ 12440733 ] Default workflow, editable Closed status [ 12564971 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12564971 ] jira [ 12585840 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Gary S. Weaver
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development