Combobox error in CS


#1

Enonic version: 7.1.0
OS: Windows
CS: 2.1.1

Hi!
Our editor has a weird issue, when editing a content type, which has a combobox. When selecting “role” input after selecting “internal” input, everything hangs for ~20-30s and the error appears in dev console. Here is a chunk of content type:

<item-set name="PROJECT_STAFF">
  <label>Staff</label>
  <items>
    <input name="internal" type="ContentSelector">
      <label>Internal employee</label>
      <occurrences minimum="0" maximum="1"/>
      <config>
        <relationshipType>system:reference</relationshipType>
        <allowPath>*</allowPath>
        <allowContentType>employee</allowContentType>
      </config>
    </input>
    <input type="TextLine" name="external_name">
      <label>External person name</label>
      <occurrences minimum="0" maximum="1"/>
    </input>
    <input type="TextLine" name="external_url">
      <label>External person URL</label>
      <occurrences minimum="0" maximum="1"/>
    </input>
    <input name="role" type="ComboBox">
      <label>Person role</label>
      <occurrences minimum="1" maximum="1"/>
      <config>
        <option value="PRO_MANAGER">Manager</option>
        <option value="PRO_LMANAGER">Local manager</option>
        <option value="PRO_PARTICIPANT">Participant</option>
      </config>
    </input>
  </items>
  <occurrences minimum="1" maximum="0"/>
</item-set>

Here is the error:

7bundle.js:1 Uncaught TypeError: t.getInputType is not a function

    at bundle.js:1

    at Array.filter (<anonymous>)

    at DisplayNameResolver.getNamesOfAllowedFields (bundle.js:1)

    at DisplayNameResolver.getFormValues (bundle.js:1)

    at DisplayNameResolver.safeEval (bundle.js:1)

    at DisplayNameResolver.execute (bundle.js:1)

    at HTMLDivElement.<anonymous> (bundle.js:1)

_all.js:2984 Uncaught RangeError: Maximum call stack size exceeded

    at String.replace (<anonymous>)

    at V (_all.js:2984)

    at Function.css (_all.js:2984)

    at et (_all.js:2984)

    at tt (_all.js:2984)

    at Object.get (_all.js:2984)

    at Function.css (_all.js:2984)

    at _all.js:2984

    at _ (_all.js:2984)

    at k.fn.init.k.fn.<computed> [as width] (_all.js:2984)

_all.js:2984 Uncaught RangeError: Maximum call stack size exceeded

    at String.replace (<anonymous>)

    at V (_all.js:2984)

    at Function.css (_all.js:2984)

    at Object.set (_all.js:2984)

    at Function.style (_all.js:2984)

    at _all.js:2984

    at _ (_all.js:2984)

    at k.fn.init.k.fn.<computed> [as outerWidth] (_all.js:2984)

    at applyColumnHeaderWidths (_all.js:14272)

    at autosizeColumns (_all.js:14215)

bundle.js:1 Uncaught TypeError: t.getInputType is not a function

    at bundle.js:1

    at Array.filter (<anonymous>)

    at DisplayNameResolver.getNamesOfAllowedFields (bundle.js:1)

    at DisplayNameResolver.getFormValues (bundle.js:1)

    at DisplayNameResolver.safeEval (bundle.js:1)

    at DisplayNameResolver.execute (bundle.js:1)

    at HTMLDivElement.<anonymous> (bundle.js:1)

_all.js:2984 Uncaught RangeError: Maximum call stack size exceeded

    at String.replace (<anonymous>)

    at V (_all.js:2984)

    at Function.css (_all.js:2984)

    at et (_all.js:2984)

    at Object.set (_all.js:2984)

    at Function.style (_all.js:2984)

    at _all.js:2984

    at _ (_all.js:2984)

    at k.fn.init.k.fn.<computed> [as outerWidth] (_all.js:2984)

    at applyColumnHeaderWidths (_all.js:14272)

_all.js:1 WebSocket is already in CLOSING or CLOSED state.

(anonymous) @ _all.js:1

_all.js:2984 Uncaught RangeError: Maximum call stack size exceeded

    at String.replace (<anonymous>)

    at V (_all.js:2984)

    at Function.css (_all.js:2984)

    at Object.set (_all.js:2984)

    at Function.style (_all.js:2984)

    at _all.js:2984

    at _ (_all.js:2984)

    at k.fn.init.k.fn.<computed> [as outerWidth] (_all.js:2984)

    at applyColumnHeaderWidths (_all.js:14272)

    at autosizeColumns (_all.js:14215)

4bundle.js:1 Uncaught TypeError: t.getInputType is not a function

    at bundle.js:1

    at Array.filter (<anonymous>)

    at DisplayNameResolver.getNamesOfAllowedFields (bundle.js:1)

    at DisplayNameResolver.getFormValues (bundle.js:1)

    at DisplayNameResolver.safeEval (bundle.js:1)

    at DisplayNameResolver.execute (bundle.js:1)

    at HTMLDivElement.<anonymous> (bundle.js:1)

Combobox error in CS - followup
#2

Can you post the entire content type schema? It seems that you are using display name script in it, so we need the entire thing.


#3

Hi!

Yes, you are right, we are using display name script. Here is the content type:

<?xml version="1.0" encoding="UTF-8"?>
<content-type>
  <display-name>Project</display-name>
  <display-name-expression>${PROJECT_TITLE}</display-name-expression>
  <super-type>base:structured</super-type>
  <form>
    <input name="RELATED_LOCALE" type="ContentSelector">
      <label>Project page in other languages</label>
      <occurrences minimum="0" maximum="1"/>
      <config>
        <relationshipType>system:reference</relationshipType>
        <allowPath>*</allowPath>
        <allowContentType>project</allowContentType>
      </config>
    </input>
    <input type="TextLine" name="PROJECT_TITLE">
      <label>Project title</label>
      <occurrences minimum="1" maximum="1"/>
    </input>
    <input type="ImageSelector" name="PROJECT_IMAGE">
      <label>Main image</label>
      <occurrences minimum="0" maximum="1"/>
    </input>
    <input type="Date" name="PROJECT_START_DATE">
      <label>Project start date</label>
      <occurrences minimum="1" maximum="1"/>
    </input>
    <input type="Date" name="PROJECT_END_DATE">
      <label>Project end date</label>
      <occurrences minimum="1" maximum="1"/>
    </input>
    <input type="Date" name="PROJECT_UPDATED_AT">
      <label>Updated date</label>
      <occurrences minimum="1" maximum="1"/>
    </input>
    <input type="HtmlArea" name="PROJECT_INGRESS">
      <label>Ingress text</label>
      <occurrences minimum="0" maximum="1"/>
    </input>
    <input type="HtmlArea" name="PROJECT_BODY">
      <label>Body text</label>
      <occurrences minimum="0" maximum="1"/>
    </input>
    <item-set name="PROJECT_STAFF">
      <label>Staff</label>
      <items>
        <input name="internal" type="ContentSelector">
          <label>Internal employee</label>
          <occurrences minimum="0" maximum="1"/>
          <config>
            <relationshipType>system:reference</relationshipType>
            <allowPath>*</allowPath>
            <allowContentType>employee</allowContentType>
          </config>
        </input>
        <input type="TextLine" name="external_name">
          <label>External person name</label>
          <occurrences minimum="0" maximum="1"/>
        </input>
        <input type="TextLine" name="external_url">
          <label>External person URL</label>
          <occurrences minimum="0" maximum="1"/>
        </input>
        <input name="role" type="ComboBox">
          <label>Person role</label>
          <occurrences minimum="1" maximum="1"/>
          <config>
            <option value="PRO_MANAGER">Manager</option>
            <option value="PRO_LMANAGER">Local manager</option>
            <option value="PRO_PARTICIPANT">Participant</option>
          </config>
        </input>
      </items>
      <occurrences minimum="1" maximum="0"/>
    </item-set>
    <item-set name="PROJECT_LINKS">
      <label>External link</label>
      <items>
        <input type="TextLine" name="LINK_TITLE">
          <label>Link title</label>
          <occurrences minimum="1" maximum="1"/>
        </input>
        <input type="TextLine" name="LINK_URL">
          <label>Link URL</label>
          <occurrences minimum="1" maximum="1"/>
        </input>
        <input name="LINK_CLOSED" type="CheckBox">
          <label>Closed</label>
          <occurrences minimum="1" maximum="1"/>
          <default>unchecked</default>
          <config>
            <alignment>right</alignment>
          </config>
        </input>
      </items>
      <occurrences minimum="0" maximum="0"/>
    </item-set>
    <input type="TextLine" name="PROJECT_KEY_INFO_STATUS">
      <label>Status info</label>
      <occurrences minimum="0" maximum="1"/>
    </input>
    <item-set name="PROJECT_WEBSITE">
      <label>External Website</label>
      <items>
        <input type="TextLine" name="TITLE">
          <label>Title</label>
          <occurrences minimum="1" maximum="1"/>
        </input>
        <input type="TextLine" name="URL">
          <label>URL</label>
          <occurrences minimum="1" maximum="1"/>
        </input>
      </items>
      <occurrences minimum="0" maximum="1"/>
    </item-set>
    <input name="PROJECT_KEY_DIVISION" type="ContentSelector">
      <label>Project's division</label>
      <occurrences minimum="0" maximum="1"/>
      <config>
        <allowContentType>division</allowContentType>
        <relationshipType>system:reference</relationshipType>
        <allowPath>*</allowPath>
      </config>
    </input>
    <input name="PROJECT_KEY_DEPARTMENT" type="ContentSelector">
      <label>Project's department</label>
      <occurrences minimum="0" maximum="1"/>
      <config>
        <allowContentType>department</allowContentType>
        <relationshipType>system:reference</relationshipType>
        <allowPath>*</allowPath>
      </config>
    </input>
    <input type="TextLine" name="PROJECT_KEY_BUDGET">
      <label>Project's budget</label>
      <occurrences minimum="0" maximum="1"/>
    </input>
    <input type="TextLine" name="PROJECT_KEY_BUDGET_THIS_YEAR">
      <label>Project's budget this year</label>
      <occurrences minimum="0" maximum="1"/>
    </input>
    <input type="TextLine" name="PROJECT_KEY_COLLABORATION">
      <label>Project's collaboration</label>
      <occurrences minimum="0" maximum="1"/>
    </input>
    <input type="TextLine" name="PROJECT_KEY_FINANCIER">
      <label>Project's financier</label>
      <occurrences minimum="0" maximum="1"/>
    </input>
    <input name="RELATED_PUBLICATIONS" type="ContentSelector">
      <label>Related publications</label>
      <occurrences minimum="0" maximum="0"/>
      <config>
        <relationshipType>system:reference</relationshipType>
        <allowPath>*</allowPath>
        <allowContentType>publication</allowContentType>
      </config>
    </input>
    <input name="RELATED_NEWS" type="ContentSelector">
      <label>Related news</label>
      <occurrences minimum="0" maximum="0"/>
      <config>
        <relationshipType>system:reference</relationshipType>
        <allowPath>*</allowPath>
        <allowContentType>news</allowContentType>
      </config>
    </input>
    <input type="TextLine" name="PROJECT_ID">
      <label>Project ID</label>
      <occurrences minimum="0" maximum="1"/>
    </input>
    <input name="SYNC" type="CheckBox">
      <label>Sync project data with CRIStin</label>
    </input>
    <mixin name="tags"/>
  </form>
</content-type>

Thanks!


#4

This is now fixed in Content Studio 2.2.1


#5