Content dumped into wiki markup tags on upgrade
Asked by Teresa Hollidge:

We upgraded our primary Confluence server from 3.5.16 to 5.1.1. We are in the process of upgrading our secondary Confluence server from 3.5.16 to 5.3.4. There are different macros/plugins in use on the secondary server but we're running into issues with content not migrating to the new format (like Composition, Linking, table-plus, etc.)

None of the pages have "failed" migration because a giant wiki markup box has been placed around all of the content on the page. None of the pages are marked "unmigrated-wiki-markup" either.

On several pages we removed the "float" and "link-to" markup in the hopes that we could get the rest of the page to migrate properly (info is the only macro in use, the rest of content consists of headings and tables).

We've attempted to re-migrate the content using these two different methods found in the documentation:

Re-running the migration -- for content that completely failed the migration and {#toc-hId-1651232329}
------------------------------------------------------------------------------------------------------

Re-attempting the migration -- for content in 'unmigrated-wiki-markup' macro {#toc-hId--900924632}
--------------------------------------------------------------------------------------------------

with no success.

Is there a way to force re-migration on pages that have all their content wrapped in a wiki markup box? If not, how do we migrate our content completely?

-Teresa


Answers:
author: Alex Medved _ConfiForms_
body: Have you see this guide: <https://confluence.atlassian.com/display/DOC/Upgrading+from+Confluence+3.5+to+5.1+-+Simplified+Guide>upgrade from 5.1 to 5.3.4 should be much easier after that


author: Teresa Hollidge
body: Our upgrade path to 3.5.16 -\> 4.3.7 -\> 5.3.4. We successfully upgraded 3.5.16 -\> 4.3.7 -\> 5.1.1 in 2013 on our primary server. I'm not the person who does the Confluence upgrade, I handle the plugin upgrades and testing. I was not aware that there is a different recommended route. Will you point me to the where the recommended path is defined? Thanks!


author: Alex Medved _ConfiForms_
body: Have you updated your plugins before content migration? I am quite sure you did, but just a re-check.

I remember we had similar issues once, and made a "force migration" tool / xwork action

classes used:

```
import com.atlassian.confluence.content.render.xhtml.migration.BatchException;import com.atlassian.confluence.content.render.xhtml.migration.macro.ContentEntityMigrationBatchTask;import com.atlassian.confluence.macro.xhtml.XhtmlWikiMarkupMacroMigrator;import com.atlassian.confluence.content.render.xhtml.migration.ContentDao;
```

and the code for force-migration was like this:

```
new ContentEntityMigrationBatchTask(xhtmlWikiMarkupMacroMigrator, contentDao, "Manual content migration content for pageId " + pageId).apply(entityObject, 1, 1);
```

where entityObject is your page with un-migrated content


author: Nic Brough -Adaptavist-
body: A quick clarification - when you say you're going from 3.5.16 to 5.1.1 (or 5.3.4), is there a reason you've skipped the recommended route of 3.5.16 -\> 3.5.17 -\> 5.0.2 -\> 5.higher?Actually, I've found 3.5.15 or higher -\> 5.0.2 works fine, so I'm not worried about that. But I've had exactly the same symptoms you have doing 3.5.x to 5.1 or above, and have never tried it again - always gone to 5.0.2 first.


Tags: confluence-administration