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

Cannot update a content with date validator on repeater

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 4.8.0
    • 4.8.0
    • None
    • None
    • 4.8.0 M9

      In a content , there is a repeater and a date validator : 

      <cms:repeater name="repeaterDates">
              <cms:label>Repeater dates </cms:label>
                  <cms:description>Repeater dates</cms:description>
                  <cms:add-label>Ajouter</cms:add-label>
                  <cms:del-label>Supprimer</cms:del-label>
                  
                  <cms:metadata name="startdate" type="datetime">
                  <cms:label>StartDate</cms:label>
                  <cms:description>StartDate</cms:description>
                  <validation>
                  <invalidText i18n="true">CONTENT_NEWS_DATE_INVALID_FORMAT</invalidText>
              </validation>
              </cms:metadata>
             
              <cms:metadata name="enddate" type="datetime">
                  <cms:label>EndDate</cms:label>
                  <cms:description>EndDate</cms:description>
                  <validation>
                  <invalidText i18n="true">CONTENT_NEWS_DATE_INVALID_FORMAT</invalidText>
              </validation>
              </cms:metadata>
              </cms:repeater>
               
              <cms:global-validators>
              <cms:global-validator class="org.ametys.cms.contenttype.validation.DateTimeIntervalValidator">
                  <startDate path="repeaterDates/startdate"/>
                  <endDate path="repeaterDates/enddate"/>
              </cms:global-validator>        
          </cms:global-validators>

       
      I create a content without adding entries to repeater. 
      I cannot update it. 
      Following error is present in logs : 
       
      Root cause:

      java.lang.NullPointerException: Cannot invoke "org.ametys.plugins.repository.data.holder.group.ModelAwareRepeater.getEntries()" because "repeater" is null
          at org.ametys.cms.contenttype.validation.AbstractIntervalValidator._getBasesDataHolder(AbstractIntervalValidator.java:220)
          at org.ametys.cms.contenttype.validation.AbstractIntervalValidator.validate(AbstractIntervalValidator.java:176)
          at org.ametys.cms.workflow.ValidateContentCondition.passesCondition(ValidateContentCondition.java:103)
          at com.opensymphony.workflow.AbstractWorkflow.passesCondition(AbstractWorkflow.java:906)
          at com.opensymphony.workflow.AbstractWorkflow.passesConditions(AbstractWorkflow.java:940)
          at com.opensymphony.workflow.AbstractWorkflow.passesConditions(AbstractWorkflow.java:964)
          at com.opensymphony.workflow.AbstractWorkflow.getAvailableActionsForStep(AbstractWorkflow.java:688)
          at com.opensymphony.workflow.AbstractWorkflow.getAvailableActions(AbstractWorkflow.java:118)
          at org.ametys.plugins.workflow.AbstractAmetysWorkflow.getAvailableActions(AbstractAmetysWorkflow.java:117)
          at org.ametys.cms.workflow.ContentWorkflowHelper.getAvailableActions(ContentWorkflowHelper.java:235)
          at org.ametys.cms.workflow.ContentWorkflowHelper.getAvailableActions(ContentWorkflowHelper.java:217)
          at org.ametys.cms.repository.ContentDAO.getContentProperties(ContentDAO.java:667)
          at org.ametys.web.repository.content.WebContentDAO.getContentProperties(WebContentDAO.java:86)
          at org.ametys.web.repository.page.AbstractSitemapElementsDAO._zoneitem2json(AbstractSitemapElementsDAO.java:115)
          at org.ametys.web.repository.page.AbstractSitemapElementsDAO._zone2json(AbstractSitemapElementsDAO.java:87)
          at org.ametys.web.repository.page.AbstractSitemapElementsDAO._sitemapElement2json(AbstractSitemapElementsDAO.java:68)
          at org.ametys.web.repository.page.PageDAO.getPageInfos(PageDAO.java:350)
          at org.ametys.web.repository.page.PageDAO.getPagesInfos(PageDAO.java:235)
          at jdk.internal.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
          at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.base/java.lang.reflect.Method.invoke(Method.java:568)
          at org.ametys.core.ui.ExecuteClientCallsAction._executeMethod(ExecuteClientCallsAction.java:205)
          at org.ametys.core.ui.ExecuteClientCallsAction.act(ExecuteClientCallsAction.java:183)
          at org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:120)
          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)
          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.source.impl.SitemapSource.init(SitemapSource.java:333)
          at org.apache.cocoon.components.source.impl.SitemapSource.<init>(SitemapSource.java:215)
          at org.apache.cocoon.components.source.impl.SitemapSourceFactory.getSource(SitemapSourceFactory.java:68)
          at org.apache.excalibur.source.impl.SourceResolverImpl.resolveURI(SourceResolverImpl.java:208)
          at org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:558)
          at org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:558)
          at org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:558)
          at org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:558)
          at org.ametys.core.ui.dispatcher.DispatchGenerator._dispatchingSubRequest(DispatchGenerator.java:217)
          at org.ametys.core.ui.dispatcher.DispatchGenerator._dispatching(DispatchGenerator.java:142)
          at org.ametys.core.ui.dispatcher.DispatchGenerator.generate(DispatchGenerator.java:93)
          at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:581)
          at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:301)
          at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:483)
          at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:144)
          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.process(ConcreteTreeProcessor.java:178)
          at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)
          at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118)
          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.process(ConcreteTreeProcessor.java:178)
          at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)
          at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118)
          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.process(ConcreteTreeProcessor.java:178)
          at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)
          at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118)
          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.process(ConcreteTreeProcessor.java:178)
          at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)
          at org.apache.cocoon.Cocoon.process(Cocoon.java:699)
          at org.ametys.runtime.servlet.RuntimeServlet.service(RuntimeServlet.java:717)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
          at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
          at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
          at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
          at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
          at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
          at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
          at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
          at java.base/java.lang.Thread.run(Thread.java:833)

            cedric Cédric Damioli
            mfranchet Magali Franchet
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: