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

We can delete an image from ressource directory even if it is used in contents

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 4.4.4, 4.5.0
    • 4.4.1
    • None
    • None
    • 4.5 M3

      It's possible to delete a file from ressource explorer, even if this file is referenced in other contents.

      After deleting the file it's impossible to display the content as we get an error :

       

      
      _Caused by:_ org.apache.jackrabbit.core.state.NoSuchItemStateException: 09509842-4dbf-4edd-9c0b-65372b3f4f5e
      at org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.load(AbstractBundlePersistenceManager.java:492)
      at org.ametys.plugins.repository.provider.AmetysPersistenceManager.load(AmetysPersistenceManager.java:192)
      at org.apache.jackrabbit.core.state.SharedItemStateManager.loadItemState(SharedItemStateManager.java:1878)
      at org.apache.jackrabbit.core.state.SharedItemStateManager.getNonVirtualItemState(SharedItemStateManager.java:1798)
      at org.apache.jackrabbit.core.state.SharedItemStateManager.getItemState(SharedItemStateManager.java:271)
      ... 106 more
      
      

       

      
      org.ametys.plugins.repository.UnknownAmetysObjectException: There's no node for id resource://09509842-4dbf-4edd-9c0b-65372b3f4f5e 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.CompositeRepositoryModelItemType._valueToSAX(CompositeRepositoryModelItemType.java:75) at org.ametys.cms.data.type.impl.CompositeRepositoryModelItemType.valueToSAX(CompositeRepositoryModelItemType.java:54) 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) at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:301) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:782) at org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:414) at org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:101) at org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:321) at org.apache.cocoon.sitemap.ContentAggregator.generate(ContentAggregator.java:125) 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:782) at org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:414) at org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:101) at org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:181) at org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:140) at org.ametys.web.repository.PageGenerator._saxSource(PageGenerator.java:722) at org.ametys.web.repository.PageGenerator._saxZoneItem(PageGenerator.java:519) at org.ametys.web.repository.PageGenerator._saxZoneItems(PageGenerator.java:389) at org.ametys.web.repository.PageGenerator._saxZone(PageGenerator.java:316) at org.ametys.web.repository.PageGenerator.generate(PageGenerator.java:237) 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:782) at org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:414) at org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:101) at org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:321) at org.apache.cocoon.sitemap.ContentAggregator.generate(ContentAggregator.java:125) 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.Cocoon.process(Cocoon.java:699) at org.ametys.runtime.servlet.RuntimeServlet.service(RuntimeServlet.java:571) at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) 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:97) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: javax.jcr.ItemNotFoundException: 09509842-4dbf-4edd-9c0b-65372b3f4f5e at org.apache.jackrabbit.core.ItemManager.getItemData(ItemManager.java:384) at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:328) at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:621) at org.apache.jackrabbit.core.SessionImpl.getNodeById(SessionImpl.java:538) at org.apache.jackrabbit.core.SessionImpl.getNodeByIdentifier(SessionImpl.java:1142) at org.ametys.plugins.repository.jcr.SimpleAmetysObjectFactory.getNode(SimpleAmetysObjectFactory.java:176) ... 96 more Caused by: org.apache.jackrabbit.core.state.NoSuchItemStateException: 09509842-4dbf-4edd-9c0b-65372b3f4f5e at org.apache.jackrabbit.core.state.SharedItemStateManager.getItemState(SharedItemStateManager.java:290) at org.apache.jackrabbit.core.state.LocalItemStateManager.getNodeState(LocalItemStateManager.java:110) at org.apache.jackrabbit.core.state.LocalItemStateManager.getItemState(LocalItemStateManager.java:175) at org.apache.jackrabbit.core.state.XAItemStateManager.getItemState(XAItemStateManager.java:260) at org.apache.jackrabbit.core.state.SessionItemStateManager.getItemState(SessionItemStateManager.java:161) at org.apache.jackrabbit.core.ItemManager.getItemData(ItemManager.java:382) ... 101 more Caused by: org.apache.jackrabbit.core.state.NoSuchItemStateException: 09509842-4dbf-4edd-9c0b-65372b3f4f5e at org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.load(AbstractBundlePersistenceManager.java:492) at org.ametys.plugins.repository.provider.AmetysPersistenceManager.load(AmetysPersistenceManager.java:192) at org.apache.jackrabbit.core.state.SharedItemStateManager.loadItemState(SharedItemStateManager.java:1878) at org.apache.jackrabbit.core.state.SharedItemStateManager.getNonVirtualItemState(SharedItemStateManager.java:1798) at org.apache.jackrabbit.core.state.SharedItemStateManager.getItemState(SharedItemStateManager.java:271) ... 106
      
      

       

       

        1. 2021.07.30-11.18.30_bguLGD.png
          82 kB
          Adélaïde Palacios
        2. 2021.07.30-11.19.56_gHqcsw.png
          48 kB
          Adélaïde Palacios
        3. 2021.07.30-11.25.02_YRfQK6.png
          36 kB
          Adélaïde Palacios

            cbayle Caroline Bayle
            adelaide Adélaïde Palacios (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: