Okay, i have been pulling my hairs since yesterday ( whatever left of it at least ) trying to solve this issue!
You login to the admin panel in wordpress to publish a new post or page with custom fields, you enter the custom field key and value then click “add custom field” button but nothing happens, the truth is it actually inserts the key and the value, the problem is there is no Ajax/Jquery visual feedback .
By examining the console window using firebug, you’ll get the following when clicking the button:
XML or text declaration not at start of entity
[Break on this error] ... position='1'>< ![CDATA[
Believe it or don’t, if you have been working on the file function.php make sure you remove extra line breaks top to bottom! And yeah im serious! Extra line breaks were the reason why custom fields were misbehaving!