Views AJAX problems

by John McGeechan


Recently had the ajax functionality in views admin suddenly start  throwing errors...

An error occured at /admin/build/views/ajax/config_item/....

This error extended to most ajax operations with views admin and meant that none of the ajax functionality would work


The problem is due to the fact that certain views functions use references in the signature, in this particular instance....
function views_ui_ajax_form($js, $key, &$view, $display_id) {

As it turns out php 5.3, will throw an error if a reference is not passed to this function (we recently upgraded php to 5.3, no good deed will go unpunished)


The two main solutions are either to downgrade your php binary or alternatively upgrade your views version to at least views 6.x-2.13
which changes the function signature....

function views_ui_ajax_form($js, $key, $view, $display_id) {

If you want the full discussion, check out Make Views compatible with PHP 5.3 (but don't break it for PHP 4.x)