Uploaded image for project: 'Nuxeo Studio'
  1. Nuxeo Studio
  2. NXS-5019

Fix log ERROR when using the Files widget

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.14.0
    • Component/s: Layouts & Widgets
    • Backlog priority:
      800
    • Sprint:
      NOS 10.10.3 - end dec, NOS 10.10.4 - begin jan, NOS 10.10.5 - mid jan, NOS 11.1.7 - 2019-04 2, NOS 11.1.8 - 2019-05 01, NOS 11.1.9 - 2019-05 02, NOS 11.1.10 - 2019-06 01, NOS 11.1.11 - 2019-06 02
    • Story Points:
      3

      Description

      Context

      When using the Files widget from the files schema as described by NXP-25810, we get these errors in the logs:

      2018-11-21T14:56:05,906 ERROR [RemovedProperty] Property 'files/-1/filename' is marked as removed from 'files' schema, don't use it anymore. Return null
      2018-11-21T14:56:05,906 ERROR [RemovedProperty] Property 'files/-1/filename' is marked as removed from 'files' schema, don't use it anymore. Do nothing
      

      The fix is probably to use file/name instead of the old filename property when generating the files widget:

            <widget name="files" type="filesList">
              <labels>
                <label mode="any">Files</label>
              </labels>
              <translated>false</translated>
              <fields>
                <field>files:files</field>
              </fields>
              <subWidgets>
                <widget name="sub0" type="file">
                  <labels>
                    <label mode="any"></label>
                  </labels>
                  <translated>false</translated>
                  <fields>
                    <field>file</field>
                    <field>file/name</field>
                  </fields>
                </widget>
              </subWidgets>
            </widget>
      

      Reproduction

      Steps for reproduction:

      1. Download Nuxeo Server 9.10
      2. Install JSF UI
      3. In Studio, create a custom Document Type called "JsonFiles", and make sure it extends the schema "files"
        1. Once the document type created, navigate to tab "Schema"
        2. Add extra schemas to this document type: "files"
        3. Go to "Creation Layout"
        4. Replace "WARNING" by "Files" widget. "Files" widget can be selected on the right panel: Widget by Property > Schemas > files.
        5. Click button "Save work in progress"
        6. Do the same thing for "Edit Layout"
        7. Do the same thing for "View Layout"
      4. Sync the project with the server
      5. Create a document and attach 2 JSON files using the button "Add New Attached File"
      6. Save the document
      7. Observe the server logs contain:
        2019-04-25 17:20:38,907 ERROR [RemovedProperty] Property 'files/-1/filename' is marked as removed from 'files' schema, don't use it anymore. Return null
        2019-04-25 17:20:38,907 ERROR [RemovedProperty] Property 'files/-1/filename' is marked as removed from 'files' schema, don't use it anymore. Do nothing
        2019-04-25 17:20:38,907 ERROR [RemovedProperty] Property 'files/-1/filename' is marked as removed from 'files' schema, don't use it anymore. Return null
        2019-04-25 17:20:38,907 ERROR [RemovedProperty] Property 'files/-1/filename' is marked as removed from 'files' schema, don't use it anymore. Do nothing
        

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week
                  1w