Importing LAR into Site Template fails with NoSuchLayoutSetPrototypeException
Description
Environment
Activity
andrew jardine January 29, 2016 at 12:40 PM
Hi Guys –
I know this is an old thread and that this has been solved now but I have an environment where the import was done and this error started. It was ignored and more content was added. The old LAR file is not longer available (or valid actually). With this exception occurring in an existing environment, does anyone know how it can be fixed (through db updates perhaps?)
Any help will be greatly appreciated.

Pani Gui February 14, 2012 at 11:02 PM
PASSED Manual Testing following steps in description.
Reproduced on:
Tomcat 7.0 + MySQL 5. 6.1.x GIT ID: c9f83a5118737a4e3db3d7576fad233faa8e30ca.
Tomcat 7.0 + MySQL 5. 6.2.x GIT ID: 6bd382f76b1ec306a2fe498ffa6c650a8710646b.
Importing site template fails and throwing error in the console.
Fixed on:
Tomcat 7.0 + MySQL 5. 6.1.x GIT ID: 4166a5e8894ce3c6024bfc549545e5fc74c1320c.
Tomcat 7.0 + MySQL 5. 6.2.x GIT ID: 6535813184f8681e14487b205c17df1caee259d0.
Importing site template successfully and there is no error in the console.

Michael Saechang February 10, 2012 at 2:26 PM
Committed on:
6.1.x GIT ID: 34fc49308aec779108325cec6263f805a1109bde.
6.2.x GIT ID: 755b09b9815bf02674292ddc8adf418770cecdd3.

David Kliczbor February 9, 2012 at 5:48 AM
Additional Information/Workaround:
Export the source Site Template (as you'd normally would do) to a .lar file
Find the UUID of the target Site Template on the target system (you need to create an empty Site Template on the target system anyway, so do it now if not already done)
One way to do this is to immediately export the empty site template on the target system, open the .lar (it's a renamed zip file anyway), look at manifest.xml, check
/root/header/@layout-set-prototype-uuid
Unpack the exported .lar file
Open the unpacked manifest.xml
Change
/root/header/@layout-set-prototype-uuid
to the UUID found in step 2:Re-pack the exported files and folders file in ZIP format (take care to preserve the folder structure) and rename the new ZIP file to
yourfilename.lar
Import the .lar into the empty target Site Template on the target system.
@Drew: We now have a working workaround, but it's still inconvenient and not that easy to communicate to a site admin... So, yes, it's still an issue to us.
(Feature Wishlist: Export/Import complete Site Template without having to create an empty Site Template to import into – which would mean to introduce an import button next to the "Add" button in the Site Template section of the Control Panel. Nice to have: an export button in the "Action" menu of the Site Template Overview. At least, that's where I'd intuitively expect these buttons.)

Michael Saechang February 1, 2012 at 11:39 AM
Updated ticket as per Drew's comment. Thank you for verifying.
Details
Assignee
Pani GuiPani Gui(Deactivated)Reporter
David KliczborDavid KliczborLabels
Branch Version/s
6.1.xBackported to Branch
CommittedFix Priority
4Git Pull Request
Components
Fix versions
Affects versions
Priority
Medium
Details
Details
Assignee

Reporter

Labels
Branch Version/s
Backported to Branch
Fix Priority
Git Pull Request
Components
Fix versions
Affects versions
Priority
Zendesk Support
Linked Tickets
Zendesk Support
Linked Tickets
Zendesk Support

Summary
When importing a LAR previously exported from a Site Template into a fresh Site Template in another installation, the import fails with an unknown issue (as reported by the UI).
Steps to reproduce
Create a Site Template with some pages
Go to "Manage Pages" of this template and export it to LAR
Create a fresh liferay installation
Create a fresh Site Template
Go to "Manage Pages" of this template and import it from LAR
Expected result
The Site Template is correctly imported from LAR.
Actual result
The UI shows an "unknown issue" (german error: "Eine unerwartete Störung trat beim Importieren Ihrer Datei auf.")
The log shows: