diff --git a/lib/Cake/View/JsonView.php b/lib/Cake/View/JsonView.php index f057f08c9..66613a2c1 100644 --- a/lib/Cake/View/JsonView.php +++ b/lib/Cake/View/JsonView.php @@ -96,6 +96,9 @@ class JsonView extends View { return $content; } if ($view !== false && $viewFileName = $this->_getViewFileName($view)) { + if (!$this->_helpersLoaded) { + $this->loadHelpers(); + } $content = $this->_render($viewFileName); $this->Blocks->set('content', $content); return $content; diff --git a/lib/Cake/View/XmlView.php b/lib/Cake/View/XmlView.php index 9eea5e5ee..8d88a810f 100644 --- a/lib/Cake/View/XmlView.php +++ b/lib/Cake/View/XmlView.php @@ -99,6 +99,9 @@ class XmlView extends View { return $content; } if ($view !== false && $viewFileName = $this->_getViewFileName($view)) { + if (!$this->_helpersLoaded) { + $this->loadHelpers(); + } $content = $this->_render($viewFileName); $this->Blocks->set('content', (string)$content); return $content;