Uploaded image for project: 'Newsletter'
  1. Newsletter
  2. NEWSLETTER-245

Unable to send a newsletter : NullPointer getBodyAsHTML

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 1.11.0, 2.0.0
    • 1.10.0
    • None

      Caused by: org.apache.cocoon.ProcessingException: Sitemap: error when calling sub-sitemap
      at <map:mount> - resource://org/ametys/runtime/kernel/sitemap.xmap:149:82
      at org.apache.cocoon.ProcessingException.throwLocated(ProcessingException.java:113)
      at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:122)
      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)
      ... 77 more
      Caused by: java.lang.NullPointerException
      at org.ametys.plugins.newsletter.workflow.SendNewsletterFunction._getBodyAsHtml(SendNewsletterFunction.java:218)
      at org.ametys.plugins.newsletter.workflow.SendNewsletterFunction.execute(SendNewsletterFunction.java:86)
      at sun.reflect.GeneratedMethodAccessor108.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.ametys.runtime.plugin.component.PluginsComponentManager$ComponentInvocationHandler.invoke(PluginsComponentManager.java:159)
      at com.sun.proxy.$Proxy15.execute(Unknown Source)
      at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:871)
      at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1275)
      at org.ametys.plugins.workflow.Workflow.transitionWorkflow(Workflow.java:496)
      at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:567)
      at org.ametys.plugins.workflow.Workflow.doAction(Workflow.java:253)
      at org.ametys.plugins.workflow.cocoon.WorkflowAction._act(WorkflowAction.java:45)
      at org.ametys.cms.workflow.ContentWorkflowAction._act(ContentWorkflowAction.java:68)
      at org.ametys.plugins.workflow.cocoon.AbstractWorkflowAction.act(AbstractWorkflowAction.java:58)
      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.ActTypeNode.invoke(ActTypeNode.java:139)
      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)

          [NEWSLETTER-245] Unable to send a newsletter : NullPointer getBodyAsHTML

          The proposed patch was not applied.
          Fix CMS-7037 instead, which solved the problem.

          Laurence Aumeunier added a comment - The proposed patch was not applied. Fix CMS-7037 instead, which solved the problem.

          In the web patch : addition of methods that allow to specify the default value wanted for a site parameter of any of the supported types. In the newsletter patch : a call to one of those new methods.

          Quentin Glinel-Mortreuil (Inactive) added a comment - In the web patch : addition of methods that allow to specify the default value wanted for a site parameter of any of the supported types. In the newsletter patch : a call to one of those new methods.

          It already had a default value. The issue should only appear in sites created before the addition of the parameter "newsletter-mail-include-images", that have updated the version of the plugin Newsletter without having re-validated the site's configuration.

          Quentin Glinel-Mortreuil (Inactive) added a comment - It already had a default value. The issue should only appear in sites created before the addition of the parameter "newsletter-mail-include-images", that have updated the version of the plugin Newsletter without having re-validated the site's configuration.

          It could be nice to have a default value in order to avoid saving the configuration

          Frederic Ravetier (Inactive) added a comment - It could be nice to have a default value in order to avoid saving the configuration

          This is due to the missing site parameter "newsletter-mail-include-images" added with the v1.10.0 of the plugin Newsletter.
          If you validate the site configuration, the error is fixed.
          There is no default value for the parameter, when it should have one.

          "getValueAsBoolean" returns "(Boolean) null", which can't be stored in a "boolean" (lower case boolean)

          Grégory Lefebvre (Inactive) added a comment - - edited This is due to the missing site parameter "newsletter-mail-include-images" added with the v1.10.0 of the plugin Newsletter. If you validate the site configuration, the error is fixed. There is no default value for the parameter, when it should have one. "getValueAsBoolean" returns "(Boolean) null", which can't be stored in a "boolean" (lower case boolean)

          When validating the newsletter

          Frederic Ravetier (Inactive) added a comment - When validating the newsletter

            laurence Laurence Aumeunier
            fravetier Frederic Ravetier (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: