Uploaded image for project: '{RETIRED} XWiki Enterprise'
  1. {RETIRED} XWiki Enterprise
  2. XE-1156

XWiki.AttachmentSelector does not work when Class has multiple Sheets bound

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.0
    • 3.5
    • None
    • XWiki 3.5 with default XAR imported
    • Sheet AttachmentSelector xaction upload

    Description

      With two Sheets bound to a class to display separate view and edit page layouts the AttachmentSelector fails to set the uploaded file.
      Sheet 1 has the 'edit' property set for the XWiki.SheetDescriptorClass object.
      Sheet 2 has the 'view' property set for the XWiki.SheetDescriptorClass object.

      It sends a redirect with a docAction=inline which doesn't display the correct layout.

      eg:
      http://localhost/wiki/bin/get/XWiki/AttachmentSelector?xaction=postUpload&docAction=inline&docname=PhotoLibrary.Albion&fieldname=PhotoLibrary.PhotoLibraryClass_0_planimage&form_token=7YE3OTmA62D8vFHztHrJ3Q

      If I remove the 'edit' XWiki.SheetDescriptorClass object then the attachment selector works, but the correct 'view' Sheet is not used.

      I worked around the default XAR import by doing the following:

      I checked in the xaction=postUpload section of the XWiki.AttachmentSelector macro if the docAction was 'inline' and I changed it to 'edit' instead.
      This then seems to work fine with both Sheets and the XWiki.SheetDescriptorClass set for both as appropriate.

      Attachments

        Activity

          People

            mflorea Marius Dumitru Florea
            jamiem Jamie Maher
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: