Ahh the culprit plugin. There was actually 2 plugins causing this issue.
The plugin System - JAD Auto Popup seems to mess up with Joomla's library for some reason. The support team for easyblog added the codes below in the file /plugins/system/jad_auto_popup/jad_auto_popup.php and it works fine now
$doc = JFactory::getDocument();
if( $doc->getType() != 'html' )
{
return;
}
hi again,