We are running an AJAX process which saves the current entry content from the publish page. This was working fine in 2.1.5. Now we are getting this error:
Fatal error: Call to protected method EE_Session::_age_flashdata() from context ‘EE_Functions’ in /home/epwebsit/public_html/twotwo/admin/expressionengine/libraries/Functions.php on line 373
The refers to the redirect method in functions.php and the call to this is not within our code. It looks like the redirect in question is the one at the end of the _save() method in the content_publish.php (If we comment this out the AJAX returns without error).
The redirect function looks like this:
function redirect($location, $method = FALSE)
{
$location = str_replace('&', '&', $this->insert_action_ids($location));
if (count($this->EE->session->flashdata))
{
// Ajax requests don't redirect - serve the flashdata
if ($this->EE->input->is_ajax_request())
{
// We want the data that would be available for the next request
$this->EE->session->_age_flashdata();
$this->EE->load->libarary('javascript');
die($this->EE->javascript->generate_json(
$this->EE->session->flashdata));
}
}
if ($method === FALSE)
{
$method = $this->EE->config->item('redirect_method');
}
switch($method)
{
case 'refresh' : header("Refresh: 0;url=$location");
break;
default : header("Location: $location");
break;
}
exit;
}
It looks like this method correctly recognises this as an AJAX call and then tries to fire the _age_flashdata() method which is throwing the error.
Even as a protected method shouldn’t this be available in this context?
Thanks, Malcolm
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.