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

When adding an image from the resource explorer to a photo gallery and removing this image from the resource explorer, the content crashes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • 4.4.2, 4.5.0
    • 4.4.1
    • None
    • None
    • 4.5 M2

      How to reproduce
      Add image in resource explorer
      Add a photo gallery
      Choose image in resource explorer
      Save

      In resource explorer, delete this image
      refresh your page

      You have this error

      Caused by: org.ametys.plugins.repository.UnknownAmetysObjectException: There's no node for id resource://6b96a603-0b66-4ba4-80bc-2c588625a65d
      	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:58)
      	at org.ametys.plugins.repository.AmetysObjectResolver.resolveById(AmetysObjectResolver.java:360)
      	at org.ametys.cms.data.ExplorerFile._getResource(ExplorerFile.java:116)
      	at org.ametys.cms.data.ExplorerFile.getMimeType(ExplorerFile.java:95)
      	at org.ametys.cms.data.type.ResourceElementTypeHelper.singleFileToSAX(ResourceElementTypeHelper.java:246)
      	at org.ametys.cms.data.type.AbstractFileElementType._singleExplorerFileToSAX(AbstractFileElementType.java:339)
      	at org.ametys.cms.data.type.AbstractFileElementType._valueToSAX(AbstractFileElementType.java:296)
      	at org.ametys.core.model.type.AbstractElementType._valueToSAX(AbstractElementType.java:265)
      	at org.ametys.core.model.type.AbstractElementType.valueToSAX(AbstractElementType.java:235)
      	at org.ametys.plugins.repository.data.holder.impl.DataHolderHelper.dataToSAX(DataHolderHelper.java:421)
      	at org.ametys.cms.data.type.impl.RepeaterRepositoryModelItemType._repeaterEntryToSAX(RepeaterRepositoryModelItemType.java:105)
      	at org.ametys.cms.data.type.impl.RepeaterRepositoryModelItemType._valueToSAX(RepeaterRepositoryModelItemType.java:80)
      	at org.ametys.cms.data.type.impl.RepeaterRepositoryModelItemType.valueToSAX(RepeaterRepositoryModelItemType.java:56)
      	at org.ametys.plugins.repository.data.holder.impl.DataHolderHelper.dataToSAX(DataHolderHelper.java:421)
      	at org.ametys.plugins.repository.data.holder.ModelAwareDataHolder.dataToSAX(ModelAwareDataHolder.java:399)
      	at org.ametys.cms.content.ContentSaxer.saxAttributes(ContentSaxer.java:340)
      	at org.ametys.cms.content.ContentSaxer.saxBody(ContentSaxer.java:168)
      	at org.ametys.web.content.ContentSaxer.saxBody(ContentSaxer.java:57)
      	at org.ametys.cms.content.ContentSaxer.saxContent(ContentSaxer.java:143)
      	at org.ametys.cms.content.ContentGenerator._saxContent(ContentGenerator.java:121)
      	at org.ametys.cms.content.ContentGenerator._generateContent(ContentGenerator.java:86)
      	at org.ametys.cms.content.ContentGenerator.generate(ContentGenerator.java:70)
      	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:581)
      

      this one no longer appears and it must be redone in its entirety.

            cbayle Caroline Bayle
            lbouziat Léa Bouziat
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: