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

Form Field Template is Not Migrated Properly After Upgrade

XMLWordPrintable

      Steps to Reproduce:

      1. Install a Confluence prior to 4.3
      2. Create a global template using form variable
      3. Saved
      4. Upgrade to at least Confluence 4.3 release
      5. Try to edit the created global template
      6. Confluence return the following ERROR in the screenshot

      Expected Results:

      Confluence should convert the global template form correctly to make it usable in Confluence 4.3 and above as wiki markup is no longer used to create page template.

      Actual Results:

      Here is the wiki markup content of the template before upgrade

      {excerpt}[SUPPORT-@VAR@|https://jira.atlassian.com/browse/CONF-@VAR@]{excerpt}

      Confluence upgrade logs mentioned that Confluence converted the template correctly as seen here:

      2013-06-06 20:45:20,094 INFO [WikiToXhtmlMigration:thread-1] [xhtml.migration.tasks.PageTemplateMigratorTask] doInTransactionWithoutResult Migrated 1 of 1 PageTemplates.
      2013-06-06 20:45:20,136 INFO [main] [render.xhtml.migration.PageTemplateWikiToXhtmlSiteMigrator] migrateSite Completed migration of page templates from wiki to XHTML with no errors.
      2013-06-06 20:45:20,136 INFO [main] [atlassian.confluence.upgrade.AbstractUpgradeManager] entireUpgradeFinished Upgrade completed successfully

      The database content after upgrade

      <p><ac:macro ac:name="excerpt"><ac:rich-text-body><at:declarations><at:string at:name="PLMID" /></at:declarations><p><a href="https://jira.atlassian.com/browse/CONF-<at:var at:name="PLMID" />">GMDSPLM-<at:var at:name="PLMID" /></a></p></ac:rich-text-body></ac:macro></p>

      Stack trace when editing the page template

      2013-06-06 23:05:46,614 WARN [http-8090-3] [gadgets.renderer.internal.GadgetSpecFactoryImpl] getGadgetSpec Error occurred while retrieving gadget spec for http://localhost:8090/rest/gadgets/1.0/g/com.atlassian.confluence.plugins.gadgets:confluence-page-gadget/gadgets/confluence-page-gadget.xml
       -- referer: http://septa:8090/confluence/pages/templates2/editpagetemplate.action?entityId=6258689 | url: /confluence/plugins/macrobrowser/browse-macros.action | userName: admin | action: browse-macros
      2013-06-06 23:05:46,616 WARN [http-8090-3] [plugins.gadgets.metadata.GadgetsMacroMetadataProvider] getData Unable to parse gadget spec [ http://localhost:8090/rest/gadgets/1.0/g/com.atlassian.confluence.plugins.gadgets:confluence-page-gadget/gadgets/confluence-page-gadget.xml ]: org.apache.shindig.gadgets.GadgetException: Unable to retrieve gadget xml. HTTP error 400
       -- referer: http://septa:8090/confluence/pages/templates2/editpagetemplate.action?entityId=6258689 | url: /confluence/plugins/macrobrowser/browse-macros.action | userName: admin | action: browse-macros
      2013-06-06 23:05:47,509 WARN [http-8090-3] [atlassian.plugin.webresource.DefaultResourceDependencyResolver] resolveDependencies Cannot find web resource module for: com.atlassian.jira.gadgets:common
       -- referer: http://septa:8090/confluence/pages/templates2/editpagetemplate.action?entityId=6258689 | url: /confluence/plugins/macrobrowser/browse-macros.action | userName: admin | action: browse-macros
      2013-06-06 23:06:02,493 ERROR [http-8090-3] [content.render.xhtml.DefaultRenderer] render Error rendering content for view: [com.ctc.wstx.exc.WstxLazyException] com.ctc.wstx.exc.WstxParsingException: Unexpected '<'  in attribute value
       at [row,col {unknown-source}]: [1,864]
       -- referer: http://septa:8090/confluence/pages/templates2/listpagetemplates.action?key= | url: /confluence/pages/templates2/editpagetemplate.action | userName: admin | action: editpagetemplate
      com.atlassian.confluence.content.render.xhtml.XhtmlException: [com.ctc.wstx.exc.WstxLazyException] com.ctc.wstx.exc.WstxParsingException: Unexpected '<'  in attribute value
       at [row,col {unknown-source}]: [1,864]
      ...
      Caused by: [com.ctc.wstx.exc.WstxLazyException] com.ctc.wstx.exc.WstxParsingException: Unexpected '<'  in attribute value
       at [row,col {unknown-source}]: [1,864]
      	at com.ctc.wstx.exc.WstxLazyException.throwLazily(WstxLazyException.java:45)
      	at com.ctc.wstx.evt.FilteredEventReader.hasNext(FilteredEventReader.java:72)
      	at com.atlassian.confluence.content.render.xhtml.XmlFragmentEventReader.hasNext(XmlFragmentEventReader.java:49)
      	at com.atlassian.confluence.content.render.xhtml.XmlFragmentBodyEventReader.hasNext(XmlFragmentBodyEventReader.java:41)
      	at com.atlassian.confluence.plugins.templates.transformer.StorageToEditorTemplateVariablesTransformer.transform(StorageToEditorTemplateVariablesTransformer.java:70)
      	... 253 more
      Caused by: com.ctc.wstx.exc.WstxParsingException: Unexpected '<'  in attribute value
       at [row,col {unknown-source}]: [1,864]
      	at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:630)
      	at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:461)
      	at com.ctc.wstx.sr.BasicStreamReader.parseNonNormalizedAttrValue(BasicStreamReader.java:1865)
      	at com.ctc.wstx.sr.BasicStreamReader.handleNsAttrs(BasicStreamReader.java:3039)
      	at com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:2936)
      	at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2848)
      	at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)
      	at com.ctc.wstx.evt.WstxEventReader.peek(WstxEventReader.java:306)
      	at com.ctc.wstx.evt.FilteredEventReader.peek(FilteredEventReader.java:120)
      	at com.ctc.wstx.evt.FilteredEventReader.hasNext(FilteredEventReader.java:70)
      	... 256 more
      

              Unassigned Unassigned
              scahyadiputra Septa Cahyadiputra (Inactive)
              Votes:
              4 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: