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

Search failed when facet with unknown content value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.9.3, 4.10.0
    • 4.10.0
    • None
    • None
    • 4.10 M1
    • Oui

      For any reason we can have a content with a linked content that not exists anymore. But it should not crash the search tool (or any other tool).

      Steps to reproduce

      • Have a search model with a facet on linked content
      • Create a content with a value for the linked content
      • Delete the linked content through the repository (use this way to keep the invalid content reference in values)

      You get an error with the following lines:

      [...]
      Caused by: org.ametys.plugins.repository.UnknownAmetysObjectException: There's no node for id orgunitContent://65eb2323-edfc-4c85-8c33-bb9b28c8e490
      	at org.ametys.plugins.repository.jcr.SimpleAmetysObjectFactory.getNode(SimpleAmetysObjectFactory.java:187)
      	at org.ametys.plugins.repository.jcr.SimpleAmetysObjectFactory.getAmetysObjectById(SimpleAmetysObjectFactory.java:137)
      	at org.ametys.plugins.repository.jcr.SimpleAmetysObjectFactory.getAmetysObjectById(SimpleAmetysObjectFactory.java:126)
      	at org.ametys.plugins.repository.jcr.SimpleAmetysObjectFactory.getAmetysObjectById(SimpleAmetysObjectFactory.java:1)
      	at org.ametys.plugins.repository.AmetysObjectResolver.resolveById(AmetysObjectResolver.java:346)
      	at org.ametys.cms.data.type.indexing.impl.ContentIndexableElementType.getFacetLabel(ContentIndexableElementType.java:171)
      	at org.ametys.cms.search.model.CriterionDefinitionHelper.getFacetLabel(CriterionDefinitionHelper.java:140)
      	at org.ametys.cms.search.cocoon.SearchJsonReader.setFacets(SearchJsonReader.java:308)
      	at org.ametys.cms.search.cocoon.SearchJsonReader.convertResults2JsonObject(SearchJsonReader.java:175)
      	at org.ametys.cms.search.cocoon.SearchJsonReader.generate(SearchJsonReader.java:134)
      	at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processReader(AbstractCachingProcessingPipeline.java:921)
      	... 74 more
      [...]

            bmaurel Bérénice Maurel
            bmaurel Bérénice Maurel
            Bérénice Maurel Bérénice Maurel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: