Fix and improve portlets and contents migration