Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-3193

Upload field do not support correctly i18n specially during D&D

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Neutral
    • None
    • 5.3.3
    • dialogs
    • None

    Description

      Defining an Upload field as supporting i18n generate error during D&D.

      To reproduce:
      In admin central, go to
      /modules/dam-app/apps/assets/subApps/detail/editor/form/tabs/asset/fields/resource
      add a property i18n = true

      If you go now to the DAM app, and create a new document using D&D you will face exceptions and the upload will not be performed.

      Reason is that the FileTransformer do not correctly support i18n.

      Proposed patch in attachment.

      In addition you will need to change the info.magnolia.ui.form.field.upload.AbstractUploadField<T>#setLocale(... implementation

      @Override
      public void setLocale(Locale locale) {
      if (getRootLayout() != null)

      { updateDisplay(); getUpload().setReceiver((Receiver) getValue()); }

      }

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              ehechinger Eric Hechinger
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD