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

Creating a Page using a Template consists with attachment macro and Form field markup break

    XMLWordPrintable

Details

    Description

      When Creating a Page using a Template consists of attachment macro and Form field markup will give the following exception:

      Cause
      java.lang.ClassCastException: com.atlassian.confluence.pages.Draft cannot be cast to com.atlassian.confluence.pages.AbstractPage
          at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernateAbstractPageDao.getAbstractPageById(HibernateAbstractPageDao.java:17) 
      
      Stack Trace:[hide]
      java.lang.ClassCastException: com.atlassian.confluence.pages.Draft cannot be cast to com.atlassian.confluence.pages.AbstractPage
      	at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernateAbstractPageDao.getAbstractPageById(HibernateAbstractPageDao.java:17)
      	at sun.reflect.GeneratedMethodAccessor551.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	at $Proxy33.getAbstractPageById(Unknown Source)
      	at com.atlassian.confluence.pages.DefaultPageManager.getAbstractPage(DefaultPageManager.java:115)
      	at sun.reflect.GeneratedMethodAccessor550.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	at $Proxy34.getAbstractPage(Unknown Source)
      	at com.atlassian.confluence.pages.actions.PageAwareInterceptor.getPageFromId(PageAwareInterceptor.java:144)
      	at com.atlassian.confluence.pages.actions.PageAwareInterceptor.getPage(PageAwareInterceptor.java:133)
      

      Steps to replicate

      1. First create page template in space
      2. Save it and then go to the home page of the particular space
      3. Click Add --> Page
      4. Click Select a page template to start from
      5. Select the template and click Next
      6. Fill in the variable with some text and press Insert Variables.
      7. Now you should see the exception on your screen.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              zyap Zed Yap [Atlassian]
              Votes:
              6 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: