The url “_layouts/savetmpl.aspx” failed on the publishing site because by default in SharePoint 2013, “SaveSiteAsTemplateEnabled” is set as “false”. Fortunately it's a very quick fix, simply change this switch to true in 3 simple steps!
- Open the site in SharePoint Designer
- Click Site Options from the ribbon
- Modify the "SaveSiteAsTemplateEnabled" and change it from "False" to "True"
That's All Folks!