1

I am trying to save a list as a template with data to copy it to other sites for testing. When I attempt to Save the List as a Template, either from the list settings in the web UI, or with the following PnP-PowerShell, I get an error that I do not understand and cannot find documentation for.

$List.SaveAsTemplate($FileName, $TemplateName, $Description, $IncludeData)
$Context.ExecuteQuery();

And the error I am seeing is

Read error on file "_catalogs/lt/Filename.stp"

0

Check List templates gallery(/_catalogs/lt) whether stp file is really saved there before error is thrown. Based on the error message it may be so that list template was saved, but then SharePoint couldn't read it. If it is saved may be it will be possible to create lists based on it regardless the error?

How many lookup columns do you have in a list?

Try to save template without data. Will error appeared?

Check your permissions to root site. Because stp file saves in a _catalogs folder of site collection root site.

How many listitems in the list?

  • 1
    There are over 12 managed metadata columns, which I believe to be the problem from reading this question's answer. I was able to save without data, so now I have to run a script to copy items – J.H. Apr 18 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.