If a portlet has been created where users have saved filters against once the portlet is XOG'd out the filters will appear in the output read file and will cause the XOG write to fail. This also can occur with views on the project object and the idea object as well.
Here is the error that gets generated. You can replicate this by saving a filter to a project view then XOGing that out using the content pack XOG.
When an object is xogged out (including its views), it brings out <filterValueSet> sections that don't include any <filterValue> sections within them.
They appear to be customized filters that were saved by users. They fail the XML validation checks of the XOG webservice because it requires <filterValueSet> sections to contain at least one <filterValue> section.
<?xml version="1.0" encoding="UTF-8"?>
<XOGOutput xmlns:xsi="http://www.XXXXXXXXXX" xsi:noNamespaceSchemaLocation="../xsd/status.xsd">
<Statistics failureRecords="0" insertedRecords="0"
<Description>[Error] :0:0: uncompleted content model. expecting: <filterValue>
java.lang.Exception: Invalid xml data
Steps to Reproduce it:
- Create a simple portlet (I tested with a grid portlet) and add this portlet to a tab on any portlet page.
- In the filter section of the portlet choose to filter for specific data and save the filter.
- Use the portlet_read.xml to XOG out the portlet. Note the filterValueSet section present in the output write file.
- Use this XOG write file and attempt to XOG in to a destination server.
Expected Result: Portlet to be created in destination server.
Actual Result: XOG fails with uncompleted content model error.
This issue has been reported to development via defect number CLRT-22616 and will be addressed on a future Clarity version.
Remove filterValueSet section from the write xml before XOGing
Search within WRITE.XML files for "<filterValueSet>" and where section isn't closed with "</filterValueSet>" tag
These lines need to be removed from the file, you'll also notice that there isn't any "FieldValue" assignments contained (hence the problem Manually search for these empty <filterValueSet> sections within the XML that is xogged out and remove them. It's pretty manual and requires a good XML editor to do safely.