Neos 3.0 Insert Element error


I upgraded to neos 3.0. Every time I try to add new content element to the page I get below errors in Browser’s console and the Backend interface if frozen, The new element only appears after I refreshed the page.

SyntaxError: Unexpected token < in JSON at position 0
    at parse (<anonymous>)
    at e.parseJSON (ContentModule-built.js?bust=7d88502c34c4:428)
    at ajaxConvert (ContentModule-built.js?bust=7d88502c34c4:428)
    at S (ContentModule-built.js?bust=7d88502c34c4:428)
    at XMLHttpRequest.<anonymous> (ContentModule-built.js?bust=7d88502c34c4:428) Object 

The responseText property for the Ajax request looks like:
<div data-node-__typoscript-path="page&lt;Neos.Neos:Page&gt;/body&lt;Neos.Fusion:Template&gt;/content/main&lt;Neos.Neos:PrimaryContent&gt;/default&

Any Idea how to fix this please? I is quite annoy I need to refresh the page each time adding new content.


It might be useful for others.

It turns out in my plugin Controller I have below line. But the configured action does not return JSON data

protected $supportedMediaTypes = array('application/json', 'text/html');