Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-83267

Creating a new page from template results in an error "Caught an Ognl exception while setting property draftid" if Collaborative Editing is disabled

XMLWordPrintable

      Issue Summary

      Confluence throws an error "Caught an Ognl exception while setting property draftid" when create a new page while Collaborative Editing is disabled

      This is reproducible on Data Center: YES

      Steps to Reproduce

      1. Create a fresh Confluence 7.19.8 instance
      2. Disable Collaborative Editing
      3. Click the three dot menu (...) next to the Create button
      4. Select DACI decision template
        1. Issue impacts other templates too
      5. Fill out form or just click create

      Expected Results

      Page should be created without error and the editor loaded.

      Actual Results

      Error is displayed in the UI

      Oops - an error has occurred
      logo System Error
      A system error has occurred — our apologies!
      
      For immediate troubleshooting, consult our knowledge base for a solution.
      
      If you would like to receive support from Atlassian's support team, ask your Confluence administrator to create a support issue on Atlassian's support system with the following information:
      
      a description of your problem and what you were doing at the time it occurred
      a copy of the error and system information found below
      a copy of the application logs (if possible).
      Your Confluence administrator can use the support request form to create a support ticket which will include this information.
      
      We will respond as promptly as possible.
      Thank you!
      
      Return to site homepage…
      
      Cause
          Caught an Ognl exception while setting property draftId
      
      Referer URL
      http://localhost:27198/c7198/
       

      The below exceptions are thrown in the atlassian-confluence.log file:

      2023-04-25 11:44:28,896 ERROR [http-nio-27198-exec-5] [atlassian.confluence.servlet.ConfluenceServletDispatcher] sendError Could not execute action
       -- referer: http://localhost:27198/c7198/admin/confluence-collaborative-editor-plugin/configure.action | url: /c7198/plugins/createcontent/draft-createpage.action | traceId: de14253c0becdc20 | userName: admin
      java.lang.RuntimeException: Caught an Ognl exception while setting property draftId
      	at com.opensymphony.xwork.util.CompoundRootAccessor.setProperty(CompoundRootAccessor.java:53)
      

      Which was proceeded by a larger error:

      2023-04-25 11:44:28,888 ERROR [http-nio-27198-exec-5] [opensymphony.xwork.util.CompoundRootAccessor] setProperty Caught an Ognl exception while setting property draftId
       -- referer: http://localhost:27198/c7198/admin/confluence-collaborative-editor-plugin/configure.action | url: /c7198/plugins/createcontent/draft-createpage.action | traceId: de14253c0becdc20 | userName: admin
      ognl.MethodFailedException: Method "setDraftId" failed for object com.atlassian.confluence.plugins.createcontent.actions.CreateAndEditAction@496639b [java.lang.ClassCastException: class com.atlassian.confluence.pages.Draft cannot be cast to class com.atlassian.confluence.pages.Page (com.atlassian.confluence.pages.Draft and com.atlassian.confluence.pages.Page are in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @75595f25)]
      	at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:805)
      	at ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:946)
      	at ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectPropertyAccessor.java:76)
      	at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132)
      	at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1613)
      .................
      /-- Encapsulated exception ------------\
      java.lang.ClassCastException: class com.atlassian.confluence.pages.Draft cannot be cast to class com.atlassian.confluence.pages.Page (com.atlassian.confluence.pages.Draft and com.atlassian.confluence.pages.Page are in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @75595f25)
      	at com.atlassian.confluence.pages.actions.CreatePageAction.assignParentPage(CreatePageAction.java:210)
      	at com.atlassian.confluence.plugins.createcontent.actions.CreateAndEditAction.setDraftId(CreateAndEditAction.java:61)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      

      Workaround

      The only known workaround for this behavior is to enable Collaborative Editing. Additional workarounds will be added here when available.

              f9221957a5e4 Akshay Rai
              f040be51555f Lou Paglaiccetti
              Votes:
              11 Vote for this issue
              Watchers:
              32 Start watching this issue

                Created:
                Updated:
                Resolved: