hello everyone,

I am using drupal 6 with views 2. The problem while creating views, sometimes we get ajax error on preview something like that "An error accoured at admin/build/views/ajax/preview", I dont know why exactly this error comes but when i save such a view it causes server to stop working right there. Because it keeps executing some code in loop then we have to reboot the server.

This was the problem i caught while having the server problem second time. Please show me away to avoid this error or if this error has to come then at least it shouldn't be a problem for server. I really need help on it.

THANKS

Comments

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

PHP shouldn't really be able to do that, since at worst things will time out. Are you doing anything weird in the view that is being previewed? It's certainly possible, if using custom code, to create views that are infinitely recursive, which should cause exciting problems. Nothing I've tested does this on its own, but Views is readily expandable and it's hard to say what module might be doing what.

abrar_arshad’s picture

Status: Postponed (maintainer needs more info) » Active

yes, i also think that PHP shouldn't really do that, this is the view that creates a problem for me. The problem in this is the filter whenever i select any term id which shouldn't be included in the preview then after taking too much time it shows the ajax error.

$view = new view;
$view->name = 'sub_facts_and_figures';
$view->description = 'sub items of living in qatar';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'term_data';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('relationships', array(
'parent' => array(
'label' => 'parent',
'required' => 0,
'id' => 'parent',
'table' => 'term_hierarchy',
'field' => 'parent',
'relationship' => 'none',
),
));
$handler->override_option('fields', array(
'name' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_taxonomy' => 1,
'exclude' => 1,
'id' => 'name',
'table' => 'term_data',
'field' => 'name',
'relationship' => 'parent',
'override' => array(
'button' => 'Override',
),
),
'name_1' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 1,
'path' => '',
'link_class' => '',
'alt' => '[name_1]',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_taxonomy' => 1,
'exclude' => 0,
'id' => 'name_1',
'table' => 'term_data',
'field' => 'name',
'relationship' => 'none',
),
));
$handler->override_option('filters', array(
'tid' => array(
'operator' => 'not',
'value' => array(
'452' => '452',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'type' => 'select',
'limit' => TRUE,
'vid' => '23',
'id' => 'tid',
'table' => 'term_data',
'field' => 'tid',
'hierarchy' => 1,
'relationship' => 'none',
'reduce_duplicates' => 0,
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('cache', array(
'type' => 'none',
));
$handler->override_option('items_per_page', 0);
$handler->override_option('style_plugin', 'list');
$handler->override_option('style_options', array(
'grouping' => 'name',
'type' => 'ul',
));
$handler = $view->new_display('block', 'Block', 'block_1');
$handler->override_option('block_description', 'Sub Facts and Figures');
$handler->override_option('block_caching', -1);

abrar_arshad’s picture

Actually the problem is not simple, after rebooting the server it goes through the same problem unless i delete the record from the views_display table. I am not using custom code, this is from the views interface.

THANKS

esmerel’s picture

Status: Active » Closed (fixed)

No activity on issue for more than 6 months.