-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 3.14.0
-
Component/s: Layouts & Widgets
-
Tags:
-
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
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:
- Download Nuxeo Server 9.10
- Install JSF UI
- In Studio, create a custom Document Type called "JsonFiles", and make sure it extends the schema "files"
- Once the document type created, navigate to tab "Schema"
- Add extra schemas to this document type: "files"
- Go to "Creation Layout"
- Replace "WARNING" by "Files" widget. "Files" widget can be selected on the right panel: Widget by Property > Schemas > files.
- Click button "Save work in progress"
- Do the same thing for "Edit Layout"
- Do the same thing for "View Layout"
- Sync the project with the server
- Create a document and attach 2 JSON files using the button "Add New Attached File"
- Save the document
- 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
- is related to
-
NXS-5181 Fix regression brought by NXS-5019
- Resolved
-
NXP-18555 Deprecate the filename (sub-)field of the file and files schemas
- Resolved
-
NXS-3684 Remove common:size and file:filename from schemas for target > 8.10
- Resolved
- is required by
-
NXP-25810 Using the widget Files triggers an error
- Resolved