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

Filters on contents : NullPointerException on context "other-sites" and "all-sites"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 3.8.5, 4.1.14, 4.2.0
    • 3.8.4
    • None
    • None
    • 4.2 RC3

      java.lang.NullPointerException
          at org.ametys.web.filter.DefaultWebContentFilter$DefaultFilterSearchContext.getSharedContentsExpression(DefaultWebContentFilter.java:657)
          at org.ametys.web.filter.DefaultWebContentFilter$DefaultFilterSearchContext.getFullExpression(DefaultWebContentFilter.java:528)
          at org.ametys.web.filter.DefaultWebContentFilter.getXPathQuery(DefaultWebContentFilter.java:304)
          at org.ametys.web.filter.DefaultWebContentFilter.getMatchingContents(DefaultWebContentFilter.java:280)
          at org.ametys.web.filter.DefaultWebContentFilter.getMatchingContents(DefaultWebContentFilter.java:215)
          at org.ametys.web.filter.ContentFilterHelper.getMatchingContentIds(ContentFilterHelper.java:176)
          at org.ametys.plugins.newsletter.auto.AutomaticNewslettersEngine.getFilterResults(AutomaticNewslettersEngine.java:435)
          at org.ametys.plugins.newsletter.auto.AutomaticNewslettersEngine.createAndValidateAutomaticNewsletter(AutomaticNewslettersEngine.java:363)
          at org.ametys.plugins.newsletter.auto.AutomaticNewslettersEngine.createAutomaticNewsletters(AutomaticNewslettersEngine.java:339)
          at org.ametys.plugins.newsletter.auto.AutomaticNewslettersEngine.createAutomaticNewsletters(AutomaticNewslettersEngine.java:297)
          at org.ametys.plugins.newsletter.auto.AutomaticNewslettersEngine.run(AutomaticNewslettersEngine.java:228)
          at java.lang.Thread.run(Thread.java:748)
      
      

      I defined an automatic newsletter like this:

      <!-- 	A LA UNE 	-->
      			<extension point="org.ametys.cms.filter.ContentFilterExtensionPoint"
      		           class="org.ametys.web.filter.StaticWebContentFilter" 
      				   id="newsletter.actus.une_lorient.filter">
      		           	<title i18n="false">A la une</title>
      		           	<description i18n="false">Filtre pour le contenu "A la une" pour la newsletter automatique</description>
      		          	<content-types>
      		            	<type id="org.ametys.plugins.news.Content.news" />
      		           	</content-types>
      		            <tags>
      		            	<tag key="UNE_LORIENT" />
      		            </tags>
      		            <view>abstract</view>
      		            <context type="other-sites" lang="current" />
      		            <max-result>1</max-result>
      		            <sort-information>
      		                 <sort metadataId="lastValidationDate" ascending="false" />
      		            </sort-information>
      			</extension>
      

            Unassigned Unassigned
            lbouziat Léa Bouziat
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: