Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3282

Portlet namespace added multiple times when building form urls

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.8, 2.3.1.2
    • 2.3.4
    • Plugin - Portlet
    • None
    • Found in portlet containers Jetspeed 2 and Sitevision

    Description

      When building a form in a portlet, the action path in the portlet URL contains the namespace multiple times, and thus the namespace is not correct.

      This happens in prependNamespace() in PortletUrlHelper where three components are combined to form the complete namespace path.
      1. Portlet namespace
      2. Mode namespace
      3. Tag namespace field (default current action namespace)

      In a simple form where namespace is not declared, and action i executing in is proper mode namespace (ex. /portlet/view). Then 2 is "/portlet/view" and 3 is by default "/portlet/view" and thus complete namespace becomes "/portlet/view/portlet/view"

      Workaround for portlet developers is to set the namespace parameter on the form to "/" which results in only the mode namespace added to the path and thus the correct action is executed.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            lukaszlenart Lukasz Lenart
            lbroman Leonard Broman
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment