Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When editing a view, clicking the "delete" does not actually delete the view. When you click on the "delete" link in the views listing page this does work.
I have a fresh install of Drupal 6 with only Views 6.x.-2.x-dev and the advanced_help module installed.
As requested in the instruction here is the export for my the test view I created so that you can try and replicate the error:
$view = new view;
$view->name = 'node_story_random';
$view->description = 'This shows a random story one at a time. ';
$view->tag = 'node, story, random';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = '0';
$view->api_version = 2;
$view->disabled = FALSE; // Edit this to true to make a default view disabled initially
$view->display = array();
$display = new views_display;
$display->id = 'default';
$display->display_title = 'Defaults';
$display->display_plugin = 'default';
$display->position = '1';
$display->display_options = array(
'style_plugin' => 'default',
'style_options' => array(),
'row_plugin' => 'fields',
'row_options' => array(),
'relationships' => array(),
'fields' => array(
'title' => array(
'id' => 'title',
'table' => 'node',
'field' => 'title',
'label' => 'Title',
),
'teaser' => array(
'id' => 'teaser',
'table' => 'node_revisions',
'field' => 'teaser',
'label' => 'Teaser',
),
),
'sorts' => array(
'random' => array(
'id' => 'random',
'table' => 'views',
'field' => 'random',
'order' => 'ASC',
),
),
'arguments' => array(),
'filters' => array(
'type' => array(
'id' => 'type',
'table' => 'node',
'field' => 'type',
'operator' => 'in',
'value' => array(
'story' => 'story',
),
'group' => 0,
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'relationship' => 'none',
'expose_button' => array(
'button' => 'Expose',
),
),
),
'items_per_page' => 1,
'offset' => 0,
'use_ajax' => '1',
'use_pager' => '1',
'pager_element' => 0,
);
$view->display['default'] = $display;
$display = new views_display;
$display->id = 'page';
$display->display_title = 'Page';
$display->display_plugin = 'page';
$display->position = '2';
$display->display_options = array(
'defaults' => array(
'access' => TRUE,
'title' => TRUE,
'header' => TRUE,
'header_format' => TRUE,
'header_empty' => TRUE,
'footer' => TRUE,
'footer_format' => TRUE,
'footer_empty' => TRUE,
'empty' => TRUE,
'empty_format' => TRUE,
'use_ajax' => TRUE,
'items_per_page' => TRUE,
'offset' => TRUE,
'use_pager' => TRUE,
'pager_element' => TRUE,
'use_more' => TRUE,
'distinct' => TRUE,
'link_display' => TRUE,
'style_plugin' => TRUE,
'style_options' => TRUE,
'row_plugin' => TRUE,
'row_options' => TRUE,
'relationships' => TRUE,
'fields' => TRUE,
'sorts' => TRUE,
'arguments' => TRUE,
'filters' => TRUE,
),
'relationships' => array(),
'fields' => array(),
'sorts' => array(),
'arguments' => array(),
'filters' => array(),
'path' => 'random',
);
$view->display['page'] = $display;
$display = new views_display;
$display->id = 'block';
$display->display_title = 'Block';
$display->display_plugin = 'block';
$display->position = 0;
$display->display_options = array(
'defaults' => array(
'access' => TRUE,
'title' => TRUE,
'header' => TRUE,
'header_format' => TRUE,
'header_empty' => TRUE,
'footer' => TRUE,
'footer_format' => TRUE,
'footer_empty' => TRUE,
'empty' => TRUE,
'empty_format' => TRUE,
'use_ajax' => TRUE,
'items_per_page' => TRUE,
'offset' => TRUE,
'use_pager' => TRUE,
'pager_element' => TRUE,
'use_more' => TRUE,
'distinct' => TRUE,
'link_display' => TRUE,
'style_plugin' => TRUE,
'style_options' => TRUE,
'row_plugin' => TRUE,
'row_options' => TRUE,
'relationships' => TRUE,
'fields' => TRUE,
'sorts' => TRUE,
'arguments' => TRUE,
'filters' => TRUE,
),
'relationships' => array(),
'fields' => array(),
'sorts' => array(),
'arguments' => array(),
'filters' => array(),
);
$view->display['block'] = $display;
Comments
Comment #1
merlinofchaos CreditAttribution: merlinofchaos commentedHmm. I have seen this happen, and at the time I told myself I would need to go back and fix that. Then when I went to do it, I couldn't replicate the problem. And I can't see anything in the code that would cause this.
When I import this view, the delete button works. I am at a bit of a loss as to what the cause of this is, though I know it has happened to me in the past.
Comment #2
RoboPhred CreditAttribution: RoboPhred commentedI had the same problem a few minutes ago, but just failed to reproduce it now...
I sort-of recall that when I hit the delete button, it immediately redirected me to the view list without going through the confirm page, although I wasn't particularly paying attention and might have breezed past it.
Comment #3
RoboPhred CreditAttribution: RoboPhred commentedI have found that I can consistantly get this behavior by going to "edit" then "delete" without making any changes.
Here is the view I am getting it with, although it uses custom taxonomy. I don't know how views will handle importing into an install without that taxonomy vocab.
Comment #4
merlinofchaos CreditAttribution: merlinofchaos commentedAhh! I bet the 'destination' is overriding where the delete button wants to go with the goto. That'll be easy to fix.
Comment #5
merlinofchaos CreditAttribution: merlinofchaos commentedFixed in -dev. Thanks!
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.