Im running in to issues with returnJson not returning html or just returning and empty object:
$userHtml = craft()->logic->renderSiteMacro('_macros/elements', 'listing', $args);
$this->returnJson(array(
'success' => true,
'existing' => $userHtml
));
The return JSON is always:
{"success":true,"existing":{}}
I have double checked the html output exists and the issue persists:
- Whether returning a simple string or large chunk of html
- And with and without single quotes
- When renderSiteMacro functions runs the code through the raw filter and not