Red Hat Bugzilla – Bug 979669
Site layout with containers causes the import to fail
Last modified: 2015-01-05 20:34:20 EST
Created attachment 766803 [details]
Description of problem:
When using a site layout in which the portal page is placed inside a container, the site can be exported, but such export cannot be imported through the Site Redirects and Export/Import portlet again. Such layout generates a <page-body> element inside a <container> element in site's portal.xml file during export, which causes the following exception when the data is read during import:
org.gatein.management.api.exceptions.OperationException: Exception reading data for import.
Caused by: org.staxnav.StaxNavException: Unexpected element 'page-body' at [row,col]:[77,16]
Steps to Reproduce:
1. Start the portal, sign in as root.
2. Go to Site > Manage Sites.
3. Choose e.g. the Classic portal and click Edit Layout.
4. Switch to the containers tab in the composer window and drag e.g. a two column layout to the page. 5. Place the Portal Page in the container and save.
6. Export the site, e.g. via GET /mop.zip?filter=site-type:!user,group.
7. Go to Group > Administration > Site Redirects and Export/Import > Import Site/Space.
8. Select your exported file and an arbitrary import strategy (e.g. Conserve) and click Import.
Import fails and an exception is visible in the server log.
The data is imported successfully.