Remove error div if replaced by a popover

Avoid a unwanted margin under the div.
Merge pull request #1511 from EmmanuelVella/patch-10

Remove error div if replaced by a popover
Merge branch 'sonata/master'