This is a patch that I sent in that might help. It prevented me from adding classes during migration.
File: packages/dotlrn/tcl/community-procs.tcl
Proc: new
Change the following:
set template_id [dotlrn::get_portal_id_from_type -type $community_type]
To:
set template_id [dotlrn::get_portal_id_from_type -type $object_type]
Reasoning:
At this point, community_type is the class key and the object_type is one of dotlrn_community, dotlrn_class_instance or dotlrn_club. If you use community_type, there is no matching row in dotlrn_portal_types_map and therefore no template id.
I discovered this because, after the addition of the static_portlet stuff, I was no longer able to add classes. This code relied on the template_id to get required information.
I believe this bug would also cause the class template not to be used.
Tracy