Importing LAR into Site Template fails with NoSuchLayoutSetPrototypeException

Description

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

  1. Create a Site Template with some pages

  2. Go to "Manage Pages" of this template and export it to LAR

  3. Create a fresh liferay installation

  4. Create a fresh Site Template

  5. 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:

Environment

WinXP SP3, Java 1.6.0_27-b07, Tomcat (bundled with liferay)

Activity

Show:

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:

  1. Export the source Site Template (as you'd normally would do) to a .lar file

  2. 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

  3. Unpack the exported .lar file

  4. Open the unpacked manifest.xml

  5. Change /root/header/@layout-set-prototype-uuid to the UUID found in step 2:

  6. 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

  7. 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.

Fixed

Details

Assignee

Reporter

Branch Version/s

6.1.x

Backported to Branch

Committed

Fix Priority

4

Git Pull Request

Components

Affects versions

Priority

Zendesk Support

Created January 31, 2012 at 5:57 AM
Updated June 24, 2023 at 4:01 PM
Resolved March 12, 2012 at 2:26 PM
Loading...