Below is a list of errors that I've gotten when I've been working with creating custom site and portal site templates. The errors are sometimes VERY hard to find!
It is important to remember that the sites are created on the fly so if the portal site template is provisioning multiple site you can check the tree structure to se where the provsioning failed.
"The file or folder name contains characters that are not permitted."
- Most often this error has been casued by incomplete resource statements in the Url-field in List statement in the site configuration or,
- when a list view is used in a modul definition, e.g. missing ';',
- or misspelled resource names,
- referencing the wrong resource file/library, etc.
"Cannot complete the operation".
- Confllict between the module name in the configuration section and the named used in the module definition
- xml errors - missing end tags,
- when you provision a new list there is a mismatch between the list type and the feature id, and it looks like the 3 last digits in the feature id should match the list type!