We all know that SharePoint doesn’t support saving publishing sites as a template. I don’t recommend doing that anyway as the produced template will have errors and isn’t reliable to be used in production to create new sites off of. However, sometimes as a developer you need to save a publishing site as a template to see how SharePoint packages things. This can help you build your own custom web template which is a neat thing and replaces the need to save a publishing site as template.
save-site-as-template
Unable to save site as template “unexpected error has occurred”
User has raised the problem ticket by mentioning facing problem while save site as template, additionally the templates are getting saved in the solution gallery but not able to activate it also.