Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-11300

Problem with content widget

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.5.6, 4.6.0
    • 4.5.5
    • None
    • None
    • 4.6 M3

      To display a dropdown with 100 lines and to launch auto completion from 2 characters i did the following settings (cms:widget-params section) on the field :

       <cms:metadata name="adresse" type="content" contentType="org.ametys.plugin.members.Content.site">
              <label i18n="true">plugin.default-ctypes:CONTENT_WORKSPACES_MEMBER_SITE_LABEL</label>
              <description i18n="true">plugin.default-ctypes:CONTENT_WORKSPACES_MEMBER_SITE_DESC</description>
              <cms:widget>edition.select-referencetable-content</cms:widget>   
              <cms:widget-params>
                      <cms:param name="maxResult">100</cms:param>
                      <cms:param name="minChars">2</cms:param>
              </cms:widget-params>       
          </cms:metadata> 

      But the following error is raised when dropdown tried to be displayed :

      Caused by: java.lang.ClassCastException: class java.lang.String cannot be cast to class java.lang.Integer (java.lang.String and java.lang.Integer are in module java.base of loader 'bootstrap')
          at org.ametys.cms.search.cocoon.SearchAction.getMaxResults(SearchAction.java:253)
          at org.ametys.cms.search.cocoon.SearchAction.act(SearchAction.java:122)
          at org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:125)
          at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
          at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
          at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
          at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
          at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
          at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
          at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:236)
          at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.buildPipeline(ConcreteTreeProcessor.java:194)
          at org.apache.cocoon.components.treeprocessor.TreeProcessor.buildPipeline(TreeProcessor.java:267)
          at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:111)
          ... 109 more 

            raphael Raphaël Franchet
            dcartier David Cartier-Michaud
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: