As far as I know, even with this fix you will stell get an error. This is because in manage-portal-2.tcl an alias is used which is not defined. According to me the statement should be:
ns_db dml $db "
delete from portal_table_page_map
where page_id in (select ptgm.page_id
from portal_table_page_map ptgm,
portal_pages pp
where pp.user_id = $user_id and
pp.page_id = ptgm.page_id)
and not ( $select_clause )"
You should also upload /web/
/www/doc/sql/education.sql into the database. This is not done when following the default installation.