-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.0.10.11 DXP SP11, 7.0.0 DXP FP84, 7.0.X
-
Fix Version/s: 7.0.0 DXP FP87, 7.0.10.12 DXP SP12, 7.0.X
-
Component/s: Staging > Export/Import, ~[Archived] WCM
-
Branch Version/s:7.0.x
-
Backported to Branch:Committed
-
Fix Priority:4
-
Git Pull Request:
Reproduction Steps:
1. Set up the latest vanilla 7.0.x and start it.
2. Go to Documents and Media and add a basic document.
3. Go to Content --> Web Content and create a basic web content, and in "Related Assets" select the document then Publish.
4. Export the whole site.
5. Import the LAR. However, during import, select "Choose Content" and uncheck the box beside "Documents and Media" then import.
Actual Result: The import fails with an error on screen and with an error in the log: See attachment: importerror.txt
Expected Result: The import should be successful.
7.0.x @ 445ecc31b2fe4daa2b253bb0dcbb4e0dad77414d
master @ 12d7fabf61a8603d8ad67c716400ddda33b3cfb
Technical info:
The links.xml in the LAR files are different between 7.0.x and master:
The master version does not contain references in staged-model entries:
<StagedAssetLink> <staged-model uuid="de605baf-10b9-d674-7e70-a1ea060c5d27#69596071-1084-7b23-4e4c-5c9f3a0691c3" path="/company/20097/com.liferay.asset.kernel.model.adapter.StagedAssetLink/38152.xml" asset-entry-priority="0.0"/> <staged-model uuid="69596071-1084-7b23-4e4c-5c9f3a0691c3#de605baf-10b9-d674-7e70-a1ea060c5d27" path="/company/20097/com.liferay.asset.kernel.model.adapter.StagedAssetLink/38153.xml" asset-entry-priority="0.0"/> </StagedAssetLink>
The 7.0.x version contains them:
<StagedAssetLink> <staged-model uuid="7c683a2a-9ae8-8a6a-23f3-e9d7b5be49f8#c418b6d2-3c8c-ccdc-f6d3-14a32a96c04b" path="/company/20115/com.liferay.asset.kernel.model.adapter.StagedAssetLink/36692.xml"> <references> <reference class-name="com.liferay.journal.model.JournalArticle" class-pk="36688" group-id="36666" group-key="testsite" live-group-id="36666" type="disposable_dependency" uuid="0bb9a852-4d8b-50d6-946f-3c526fef3a49" company-id="20115" article-id="36687" preloaded="false" article-resource-uuid="7c683a2a-9ae8-8a6a-23f3-e9d7b5be49f8"/> <reference class-name="com.liferay.document.library.kernel.model.DLFileEntry" class-pk="36674" group-id="36666" group-key="testsite" live-group-id="36666" type="disposable_dependency" uuid="c418b6d2-3c8c-ccdc-f6d3-14a32a96c04b" company-id="20115"/> </references> </staged-model> <staged-model uuid="c418b6d2-3c8c-ccdc-f6d3-14a32a96c04b#7c683a2a-9ae8-8a6a-23f3-e9d7b5be49f8" path="/company/20115/com.liferay.asset.kernel.model.adapter.StagedAssetLink/36693.xml"> <references> <reference class-name="com.liferay.document.library.kernel.model.DLFileEntry" class-pk="36674" group-id="36666" group-key="testsite" live-group-id="36666" type="disposable_dependency" uuid="c418b6d2-3c8c-ccdc-f6d3-14a32a96c04b" company-id="20115"/> <reference class-name="com.liferay.journal.model.JournalArticle" class-pk="36688" group-id="36666" group-key="testsite" live-group-id="36666" type="disposable_dependency" uuid="0bb9a852-4d8b-50d6-946f-3c526fef3a49" company-id="20115" article-id="36687" preloaded="false" article-resource-uuid="7c683a2a-9ae8-8a6a-23f3-e9d7b5be49f8"/> </references> </staged-model> </StagedAssetLink>
Thus, the master version returns here, avoiding processing references: BaseStagedModelDataHandler.importReferenceStagedModels(..), while 7.0.x version keeps processing them, until it reaches the DLFileEntry, which is not imported.