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

Invalid scaffolded view for picture schema

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 73.24.5
    • Fix Version/s: 3.8.0
    • Component/s: Studio Designer
    • Backlog priority:
      550
    • Browser:
    • Sprint:
      NOS 10.10.5 - mid jan, NOS 11.1.1 - end jan, NOS mid Feb 11.1.2, NOS end Feb 11.1.3, NOS 2019-03 01
    • Story Points:
      2

      Description

      • Create a document type which extends Picture (the picture schema is associated with the document type)
      • Config the create view for the new document type
      • The code generated for the picture.views.content field is invalid. It looks like this:
          <nuxeo-data-table role="widget" items="{{document.properties.picture:views}}" orderable="true" editable="true">
            <nuxeo-data-table-column name="Title">
              <template>
                [[item.title]]
              </template>
            </nuxeo-data-table-column>
      
            <nuxeo-data-table-column name="Description">
              <template>
                [[item.description]]
              </template>
            </nuxeo-data-table-column>
      
            <nuxeo-data-table-column name="Tag">
              <template>
                [[item.tag]]
              </template>
            </nuxeo-data-table-column>
      
            <nuxeo-data-table-column name="Height">
              <template>
                [[item.height]]
              </template>
            </nuxeo-data-table-column>
      
            <nuxeo-data-table-column name="Width">
              <template>
                [[item.width]]
              </template>
            </nuxeo-data-table-column>
      
            <nuxeo-data-table-column name="Filename">
              <template>
                [[item.filename]]
              </template>
            </nuxeo-data-table-column>
      
            <nuxeo-data-table-column name="Content">
              <template>
                <nuxeo-file role="widget" value="[[item.content]]"></nuxeo-file>
              </template>
            </nuxeo-data-table-column>
      
            <nuxeo-data-table-column name="Info">
              <template>
                < role="widget"></>
                  </template>
                </nuxeo-data-table-column>
      
              <nuxeo-data-table-form>
                <template>
                  <nuxeo-input value="{{item.title}}" label="Title" type="text"></nuxeo-input>
                  <nuxeo-input value="{{item.description}}" label="Description" type="text"></nuxeo-input>
                  <nuxeo-input value="{{item.tag}}" label="Tag" type="text"></nuxeo-input>
                  <nuxeo-input value="{{item.height}}" label="Height" type="number"></nuxeo-input>
                  <nuxeo-input value="{{item.width}}" label="Width" type="number"></nuxeo-input>
                  <nuxeo-input value="{{item.filename}}" label="Filename" type="text"></nuxeo-input>
                  <nuxeo-file value="{{item.content}}"></nuxeo-file>
                  <></>
                </template>
                  </nuxeo-data-table-form>
                  </nuxeo-data-table>
      

      In this code there are two invalid fragments of code:

                < role="widget"></>
                  </template>
                </nuxeo-data-table-column>
      

      And:

                  <></>
      

      Example of JSON export of the document:

          "picture:dateline": null,
          "picture:origin": null,
          "picture:caption": null,
          "picture:language": null,
          "picture:source": null,
          "picture:cropCoords": null,
          "picture:slugline": null,
          "picture:genre": null,
          "picture:typage": null,
          "picture:credit": null,
          "picture:headline": null,
          "picture:subheadline": null,
          "picture:byline": null,
          "picture:views": [
            {
              "filename": "Thumbnail_AGS213__2.jpg",
              "width": 100,
              "description": "Thumbnail size",
              "tag": null,
              "title": "Thumbnail",
              "content": {
                "name": "Thumbnail_AGS213__2.jpg",
                "mime-type": "image/jpeg",
                "encoding": null,
                "digestAlgorithm": "MD5",
                "digest": "ad014d46af4de7601ba9b1cc58fd1547",
                "length": "135499",
                "data": "http://localhost:8080/nuxeo/nxfile/default/8b348737-b574-4bd6-b6b0-916d96e43ef0/picture:views/0/content/Thumbnail_AGS213__2.jpg?changeToken=5-0"
              },
              "height": 100,
              "info": {
                "colorSpace": "sRGB",
                "depth": 8,
                "width": 100,
                "format": "JPEG",
                "height": 100
              }
            },
            {
              "filename": "Small_AGS213__2.jpg",
              "width": 560,
              "description": "Small size",
              "tag": null,
              "title": "Small",
              "content": {
                "name": "Small_AGS213__2.jpg",
                "mime-type": "image/jpeg",
                "encoding": null,
                "digestAlgorithm": "MD5",
                "digest": "3fa4a7f9ff11f592a0bb5700455cc008",
                "length": "347080",
                "data": "http://localhost:8080/nuxeo/nxfile/default/8b348737-b574-4bd6-b6b0-916d96e43ef0/picture:views/1/content/Small_AGS213__2.jpg?changeToken=5-0"
              },
              "height": 560,
              "info": {
                "colorSpace": "sRGB",
                "depth": 8,
                "width": 560,
                "format": "JPEG",
                "height": 560
              }
            },
            {
              "filename": "Medium_AGS213__2.jpg",
              "width": 1000,
              "description": "Medium size",
              "tag": null,
              "title": "Medium",
              "content": {
                "name": "Medium_AGS213__2.jpg",
                "mime-type": "image/jpeg",
                "encoding": null,
                "digestAlgorithm": "MD5",
                "digest": "9883e08e3705dda4bda4fce1099d20f5",
                "length": "859260",
                "data": "http://localhost:8080/nuxeo/nxfile/default/8b348737-b574-4bd6-b6b0-916d96e43ef0/picture:views/2/content/Medium_AGS213__2.jpg?changeToken=5-0"
              },
              "height": 1000,
              "info": {
                "colorSpace": "sRGB",
                "depth": 8,
                "width": 1000,
                "format": "JPEG",
                "height": 1000
              }
            },
            {
              "filename": "FullHD_AGS213__2.jpg",
              "width": 1920,
              "description": "Full HD size",
              "tag": null,
              "title": "FullHD",
              "content": {
                "name": "FullHD_AGS213__2.jpg",
                "mime-type": "image/jpeg",
                "encoding": null,
                "digestAlgorithm": "MD5",
                "digest": "d9662dc1d673800516c96b45227bcabb",
                "length": "2877153",
                "data": "http://localhost:8080/nuxeo/nxfile/default/8b348737-b574-4bd6-b6b0-916d96e43ef0/picture:views/3/content/FullHD_AGS213__2.jpg?changeToken=5-0"
              },
              "height": 1920,
              "info": {
                "colorSpace": "sRGB",
                "depth": 8,
                "width": 1920,
                "format": "JPEG",
                "height": 1920
              }
            },
            {
              "filename": "OriginalJpeg_AGS213__2.jpg",
              "width": 2154,
              "description": "Original jpeg image",
              "tag": null,
              "title": "OriginalJpeg",
              "content": {
                "name": "OriginalJpeg_AGS213__2.jpg",
                "mime-type": "image/jpeg",
                "encoding": null,
                "digestAlgorithm": "MD5",
                "digest": "9d84b0ee2e8d0b27c9190b58a3ce2dba",
                "length": "3344061",
                "data": "http://localhost:8080/nuxeo/nxfile/default/8b348737-b574-4bd6-b6b0-916d96e43ef0/picture:views/4/content/OriginalJpeg_AGS213__2.jpg?changeToken=5-0"
              },
              "height": 2154,
              "info": {
                "colorSpace": "sRGB",
                "depth": 8,
                "width": 2154,
                "format": "JPEG",
                "height": 2154
              }
            }
          ],
          "picture:info": {
            "colorSpace": "sRGB",
            "depth": 8,
            "width": 2154,
            "format": "JPEG",
            "height": 2154
          },
          "nxtag:tags": [
            {
              "label": "product",
              "username": "system"
            },
            {
              "label": "furniture",
              "username": "system"
            },
            {
              "label": "cushion",
              "username": "system"
            },
            {
              "label": "floor",
              "username": "system"
            }
          ]
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 1 day, 48 minutes
                  1w 1d 48m