Uploaded image for project: 'Blog'
  1. Blog
  2. BLOG-156

An observer failed on content deletion

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None

      When deleting a content, the observer BlogVirtualPagesCachePolicy throws an error.
      It is because is try to get the "content" argument on a DELETED event. It should not because the content was deleted.

      As this oberver listen the DELETING content, it seems it will be enough .. ? May be the support of DELETED event should be simply removed ?

      org.ametys.plugins.repository.AmetysRepositoryException: Unable to get contentType property
      	at org.ametys.cms.repository.DefaultContent.getTypes(DefaultContent.java:166)
      	at org.ametys.plugins.blog.cachepolicy.BlogVirtualPagesCachePolicy.shouldClearCache(BlogVirtualPagesCachePolicy.java:88)
      	at org.ametys.web.cache.pageelement.InvalidatePageElementCacheObserver._firstPass(InvalidatePageElementCacheObserver.java:163)
      	at org.ametys.web.cache.pageelement.InvalidatePageElementCacheObserver._doObserve(InvalidatePageElementCacheObserver.java:128)
      	at org.ametys.web.cache.pageelement.InvalidatePageElementCacheObserver.observe(InvalidatePageElementCacheObserver.java:101)
      	at org.ametys.core.observation.ObservationManager._observesEvent(ObservationManager.java:355)
      	at org.ametys.core.observation.ObservationManager.notify(ObservationManager.java:159)
      	at org.ametys.cms.repository.ContentDAO.deleteContents(ContentDAO.java:270)
      	at org.ametys.cms.repository.ContentDAO.deleteContents(ContentDAO.java:181)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      

          [BLOG-156] An observer failed on content deletion

          Laurence Aumeunier made changes -
          Fix Version/s New: 2.8.0 [ 17714 ]
          Fix Version/s Original: 2.7.0 [ 16924 ]
          Laurence Aumeunier made changes -
          Fix Version/s New: 2.7.0 [ 16924 ]
          Fix Version/s Original: 2.6.0 [ 16470 ]
          Cédric Damioli made changes -
          Fix Version/s New: 2.6.0 [ 16470 ]
          Fix Version/s Original: 2.5.0 [ 16368 ]
          Cédric Damioli made changes -
          Fix Version/s New: 2.5.0 [ 16368 ]
          Fix Version/s Original: 2.4.0 [ 15651 ]
          Cédric Damioli made changes -
          Fix Version/s New: 2.4.0 [ 15651 ]
          Fix Version/s Original: 2.3.0 [ 15217 ]
          Laurence Aumeunier made changes -
          Fix Version/s New: 2.3.0 [ 15217 ]
          Fix Version/s Original: 2.2.0 [ 14500 ]
          Laurence Aumeunier created issue -

            Unassigned Unassigned
            laurence Laurence Aumeunier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: