Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-26487

"Value for SingleSelectivity instance should be a valid ID or null" on document edition with FT 10.3

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Not A Bug
    • Affects Version/s: 10.3
    • Fix Version/s: 10.10
    • Component/s: Web UI

      Description

      • Create a schema called product_catalog
        • COD_AXEBUD: Directory(directory=COD_AXEBUD)
        • COD_AXPRIM: Directory(directory=COD_AXPRIM)
        • COD_CATEGO: Directory(directory=COD_CATEGO)
        • COD_FAA: Directory(directory=COD_FAA)
        • COD_MRQ: Directory(directory=COD_MRQ)
        • COD_SFA: Directory(directory=COD_SFA)
        • COD_TYPBUD: Directory(directory=COD_TYPBUD)
        • LIB_LIBPDT: String
        • LIB_LONG_FR: String
        • LIB_TYP_MRQ: String
        • MODEL_COD: String
        • NG0001: Directory(directory=NG0001)
        • NG0002: Directory(directory=NG0002)
        • NG0082: Directory(directory=NG0082)
        • NG1102: Directory(directory=NG1102)
        • NUM_IDPDT: String
      • Create a new document type called product_picture which extends Picture
      • Associate the schema to the document type
      • Use this code in the edit layout of the document
        <!--
        `nuxeo-se-product-catalog-schema-edit-layout`
        @group Nuxeo UI
        @element nuxeo-se-product-catalog-schema-edit-layout
        -->
        <dom-module id="nuxeo-se-product-catalog-schema-edit-layout">
          <template>
            <style>
              *[role=widget] {
                padding: 5px;
              }
              
              .container {
                @apply --layout-horizontal;
                @apply --layout-justified;
                @apply --layout-wrap;
                margin: -5px;        
              }
              .column {
                @apply --layout-flex;
                padding-right: 1.3rem;
                padding-bottom: 1.3rem;
                min-width: 384px;
                margin: 5px;                
              }      
            </style>
        
        
            
            <div class="container">       
              <div class="column">
        
                <nuxeo-directory-suggestion value="{{document.properties.copyrights:audience}}" 
                                            label="[[i18n('label.copyrights.audience')]]" 
                                            directory-name="audience" 
                                            role="widget"
                                            min-chars="0">
                </nuxeo-directory-suggestion>
        
                <nuxeo-date-picker value="{{document.properties.copyrights:duration}}" 
                                   label="[[i18n('label.copyrights.duration')]]"
                                   role="widget">
                </nuxeo-date-picker>
        
                <nuxeo-directory-suggestion value="{{document.properties.copyrights:geographical_limitation}}" 
                                            label="[[i18n('label.copyrights.geographical_limitation')]]" 
                                            multiple="true" 
                                            directory-name="geographical_limitation" 
                                            role="widget"
                                            min-chars="0">
                </nuxeo-directory-suggestion>
        
                <nuxeo-directory-suggestion value="{{document.properties.copyrights:perimeter}}" 
                                            label="[[i18n('label.copyrights.perimeter')]]" 
                                            directory-name="perimeter" 
                                            role="widget"
                                            min-chars="0">
                </nuxeo-directory-suggestion>
        
              </div>
        
              
              <div class="column">
        
                <div role="widget">
                  <label>[[i18n('label.copyrights.right.download')]]</label>
                  <paper-checkbox checked="{{document.properties.copyrights:right.download}}"></paper-checkbox>
                </div>
        
                <div role="widget">
                  <label>[[i18n('label.copyrights.right.internal_sharing')]]</label>
                  <paper-checkbox checked="{{document.properties.copyrights:right.internal_sharing}}"></paper-checkbox>
                </div>
        
                <div role="widget">
                  <label>[[i18n('label.copyrights.right.external_sharing')]]</label>
                  <paper-checkbox checked="{{document.properties.copyrights:right.external_sharing}}"></paper-checkbox>
                </div>
        
                <nuxeo-directory-suggestion value="{{document.properties.copyrights:right.permission}}" 
                                            label="[[i18n('label.copyrights.right.permission')]]" 
                                            directory-name="permission" 
                                            role="widget"
                                            min-chars="0">
                </nuxeo-directory-suggestion>
              </div>
              
            </div>
                  
          </template>
        
          <script>
            Polymer({
              is: 'nuxeo-se-product-catalog-schema-edit-layout',
              behaviors: [Nuxeo.LayoutBehavior],
              properties: {
                /**
                 * @schema dublincore
                 * @schema product_catalog
                 */
                document: {
                  type: Object
                }
              }
            });
          </script>
        </dom-module>
        
        
      • Deploy your changes
      • Crete a document
      • Edit the document
      • Click on SAVE button
      • You will get this error message in the browser console:
      Error: Value for SingleSelectivity instance should be a valid ID or null
          at SingleInput.validateValue (nuxeo-app.html:69304)
          at SingleInput.setValue (nuxeo-app.html:71384)
          at HTMLElement._valueChanged (nuxeo-app.html:72660)
          at Object.runObserverEffect [as fn] (nuxeo-app.html:2887)
          at runEffectsForProperty (nuxeo-app.html:2832)
          at runEffects (nuxeo-app.html:2798)
          at HTMLElement._propertiesChanged (nuxeo-app.html:4382)
          at HTMLElement._flushProperties (nuxeo-app.html:1710)
          at HTMLElement._flushProperties (nuxeo-app.html:4230)
          at HTMLElement.__enableOrFlushClients (nuxeo-app.html:4275)
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: