While the corrected template schema may help some, it did not help me... My template was created by DNN 3.3.x and did not contain any profile definitions (they were introduced with DNN 4.3).
Here is how I fixed my problem:
The code that creates a portal adds default profile definitions, if none are found in the template. This code fails on my system (I have actually tried3 hosts and about 6 templates) , causing the first mentioned exception/error:
from ... \Library\Components\Users\Profile\ProfileController.vb
Private Shared Sub AddDefaultDefinition(ByVal PortalId As Integer, ByVal category As String, ByVal name As String, ByVal strType As String, ByVal length As Integer, ByVal types As ListEntryInfoCollection)
Dim typeInfo As ListEntryInfo = types.Item("DataType." + strType)
If typeInfo Is Nothing Then
typeInfo = types.Item("DataType.Unknown")
End If
Dim propertyDefinition As ProfilePropertyDefinition = New ProfilePropertyDefinition()
propertyDefinition.DataType = typeInfo.EntryID
This last line is where the exception occurs (it is caught in the caller of the above routine). Although strType is passed in as "text" the type info lookup is not working and gets type "Unknown" resulting in the subsequent exception.
I am thinking of raising a bug in Gemini, but maybe it is isolated to my test systems, since no-one else has posted?
Anyway the solution turns out to be simple: Go to the default DotNetNuke template, locate then cut and paste the XML profile definition block into your DNN 3.x template.