Try/Catch around buggy enablePopups function

Jira issue: wp-1036