Browse Source

Fix for ajax responses overriden by postprocess

master
Patrick Ward 9 years ago
parent
commit
1525dfc182
  1. 7
      Plugin.php

7
Plugin.php

@ -46,7 +46,12 @@ class Plugin extends PluginBase
{
Event::listen('cms.page.postprocess', function($controller, $url, $page, $dataHolder) {
$dataHolder->content = \Shortcode::parse($dataHolder->content);
// Only parse strings, so that we don't interrupt
// ajax responses that are in object or array form
if (is_string($dataHolder->content))
{
$dataHolder->content = \Shortcode::parse($dataHolder->content);
}
});
}

Loading…
Cancel
Save