We recently came across this issue when migrating some SharePoint Portal Server 2003 sites to SharePoint 2010 for a client. The UI of the site had not been upgraded and was still showing the 2003 look and feel.
When attempting to add web parts to the page using the ‘Edit Shared Page’ menu an ‘Error on page’ error appeared. It seemed that it was looking for the Core.js file. Upon inspection the page had no reference to the Core.js file – this must have been knocked out during the upgrade.
I edited the page in SharePoint Designer and added a ScriptLink tag in the <HEAD> section pointing at the Core.js file and hey presto the ‘Add web parts’ menu worked and the error was gone.
This MSDN forum post describes the issue – http://social.technet.microsoft.com/Forums/hu-HU/sharepoint2010customization/thread/542c2921-e86e-48eb-a334-6c27a09c0416.
Hope this helps someone