Browse Source

Fix for ajax responses overriden by postprocess

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

5
Plugin.php

@ -46,7 +46,12 @@ class Plugin extends PluginBase
{ {
Event::listen('cms.page.postprocess', function($controller, $url, $page, $dataHolder) { Event::listen('cms.page.postprocess', function($controller, $url, $page, $dataHolder) {
// 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); $dataHolder->content = \Shortcode::parse($dataHolder->content);
}
}); });
} }

Loading…
Cancel
Save