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.
I have a simple view listing a content type which I want to publish. The only field listed are title and publish.
When I chose a specific node by clicking on the check-box and then choose the publish operation, I either get a confirmation screen with no node specified or a different node even with a different content type.
Comments
Comment #1
bojanz CreditAttribution: bojanz commentedWell, that's the first time I've heard that. Sounds like something is going very wrong.
Can you attach the export of that view?
Comment #2
ReneD CreditAttribution: ReneD commented$view = new view;
$view->name = 'publier_les_t_moignages';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Publier les témoignages';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Publier les témoignages';
$handler->display->display_options['access']['type'] = 'role';
$handler->display->display_options['access']['role'] = array(
3 => '3',
4 => '4',
);
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '10';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
$handler->display->display_options['row_options']['inline'] = array(
'views_bulk_operations' => 'views_bulk_operations',
'title' => 'title',
'status' => 'status',
);
$handler->display->display_options['row_options']['hide_empty'] = 0;
$handler->display->display_options['row_options']['default_field_elements'] = 1;
/* Field: Content revision: Bulk operations */
$handler->display->display_options['fields']['views_bulk_operations']['id'] = 'views_bulk_operations';
$handler->display->display_options['fields']['views_bulk_operations']['table'] = 'node_revision';
$handler->display->display_options['fields']['views_bulk_operations']['field'] = 'views_bulk_operations';
$handler->display->display_options['fields']['views_bulk_operations']['label'] = '';
$handler->display->display_options['fields']['views_bulk_operations']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['alter']['external'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['views_bulk_operations']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['views_bulk_operations']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['alter']['trim'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['alter']['html'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['views_bulk_operations']['element_default_classes'] = 1;
$handler->display->display_options['fields']['views_bulk_operations']['hide_empty'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['empty_zero'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['views_bulk_operations']['vbo']['entity_load_capacity'] = '10';
$handler->display->display_options['fields']['views_bulk_operations']['vbo']['operations'] = array(
'system_message_action' => array(
'selected' => 0,
'use_queue' => 0,
'skip_confirmation' => 0,
'override_label' => 0,
'label' => '',
),
'node_assign_owner_action' => array(
'selected' => 0,
'use_queue' => 0,
'skip_confirmation' => 0,
'override_label' => 0,
'label' => '',
),
'system_send_email_action:a12d39c177254b7ebf91f3767dbc5bd3' => array(
'selected' => 0,
'use_queue' => 0,
'skip_confirmation' => 0,
'override_label' => 0,
'label' => '',
),
'views_bulk_operations_delete_item' => array(
'selected' => 0,
'use_queue' => 0,
'skip_confirmation' => 0,
'override_label' => 0,
'label' => '',
),
'node_unpublish_action' => array(
'selected' => 1,
'use_queue' => 0,
'skip_confirmation' => 0,
'override_label' => 0,
'label' => '',
),
'node_unpublish_by_keyword_action' => array(
'selected' => 0,
'use_queue' => 0,
'skip_confirmation' => 0,
'override_label' => 0,
'label' => '',
),
'node_save_action' => array(
'selected' => 0,
'use_queue' => 0,
'skip_confirmation' => 0,
'override_label' => 0,
'label' => '',
),
'system_send_email_action' => array(
'selected' => 0,
'use_queue' => 0,
'skip_confirmation' => 0,
'override_label' => 0,
'label' => '',
),
'views_bulk_operations_script_action' => array(
'selected' => 0,
'use_queue' => 0,
'skip_confirmation' => 0,
'override_label' => 0,
'label' => '',
),
'views_bulk_operations_argument_selector_action' => array(
'selected' => 0,
'skip_confirmation' => 0,
'override_label' => 0,
'label' => '',
'settings' => array(
'url' => '',
),
),
'node_promote_action' => array(
'selected' => 0,
'use_queue' => 0,
'skip_confirmation' => 0,
'override_label' => 0,
'label' => '',
),
'node_publish_action' => array(
'selected' => 1,
'use_queue' => 0,
'skip_confirmation' => 0,
'override_label' => 0,
'label' => '',
),
'system_goto_action:fc3f3c17020f594f47b6d3a91eb5f576' => array(
'selected' => 0,
'use_queue' => 0,
'skip_confirmation' => 0,
'override_label' => 0,
'label' => '',
),
'system_goto_action' => array(
'selected' => 0,
'use_queue' => 0,
'skip_confirmation' => 0,
'override_label' => 0,
'label' => '',
),
'node_unpromote_action' => array(
'selected' => 0,
'use_queue' => 0,
'skip_confirmation' => 0,
'override_label' => 0,
'label' => '',
),
'node_make_unsticky_action' => array(
'selected' => 0,
'use_queue' => 0,
'skip_confirmation' => 0,
'override_label' => 0,
'label' => '',
),
'system_send_email_action:1e48421614a2ce3dccd8fef150e7a443' => array(
'selected' => 0,
'use_queue' => 0,
'skip_confirmation' => 0,
'override_label' => 0,
'label' => '',
),
'node_make_sticky_action' => array(
'selected' => 0,
'use_queue' => 0,
'skip_confirmation' => 0,
'override_label' => 0,
'label' => '',
),
);
$handler->display->display_options['fields']['views_bulk_operations']['vbo']['enable_select_all_pages'] = 1;
$handler->display->display_options['fields']['views_bulk_operations']['vbo']['display_type'] = '0';
$handler->display->display_options['fields']['views_bulk_operations']['vbo']['display_result'] = 1;
$handler->display->display_options['fields']['views_bulk_operations']['vbo']['merge_single_action'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['vbo']['force_single'] = 0;
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
/* Field: Content: Published */
$handler->display->display_options['fields']['status']['id'] = 'status';
$handler->display->display_options['fields']['status']['table'] = 'node';
$handler->display->display_options['fields']['status']['field'] = 'status';
$handler->display->display_options['fields']['status']['label'] = 'Publié';
$handler->display->display_options['fields']['status']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['status']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['status']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['status']['alter']['external'] = 0;
$handler->display->display_options['fields']['status']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['status']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['status']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['status']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['status']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['status']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['status']['alter']['trim'] = 0;
$handler->display->display_options['fields']['status']['alter']['html'] = 0;
$handler->display->display_options['fields']['status']['element_label_colon'] = 1;
$handler->display->display_options['fields']['status']['element_default_classes'] = 1;
$handler->display->display_options['fields']['status']['hide_empty'] = 0;
$handler->display->display_options['fields']['status']['empty_zero'] = 0;
$handler->display->display_options['fields']['status']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['status']['not'] = 0;
/* Sort criterion: Content: Post date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'temoignage' => 'temoignage',
);
/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'publier-t-moignages';
$handler->display->display_options['menu']['type'] = 'normal';
$handler->display->display_options['menu']['title'] = 'Publier les témoignages v2';
$handler->display->display_options['menu']['name'] = 'menu-editeur';
$translatables['publier_les_t_moignages'] = array(
t('Master'),
t('Publier les témoignages'),
t('more'),
t('Apply'),
t('Reset'),
t('Sort by'),
t('Asc'),
t('Desc'),
t('Items per page'),
t('- All -'),
t('Offset'),
t('Publié'),
t('Page'),
);
Comment #3
ReneD CreditAttribution: ReneD commentedSo far, my investigation leads me to believe the following:
The Nid and Vid fields are different on each node in my database.
The content displayed on the view is based on the "Nid".
However, the items presented on the confirmation page seems to be displayed with a selection of Nid (item to be confirmed) = Vid (of items displayed in the view). Thus leading to the wrong items being displayed (and I guess to the wrong action being taken).
I tested it on a database where Nid = Vid and it seems to be working fine.
Comment #4
kkrehl CreditAttribution: kkrehl commentedSame problem here. I imported the nodes using the feeds module. After importing content of type 1 i imported type 2. When selecting nodes of type 1 with vbo, the node titles presented by vbo are all from nodes of type 2. When selecting nodes of type 2, vbo shows no nodes to be selected.
@ReneD: Is it possible to correct this? Or somehow cleanup the database?
Edit: I think we both made the mistake to use "Content revision: Bulk operations" instead of "Content: Bulk operations" in the view. Because the nid of my contenttype 2 was generally bigger, the rule interpreted the vid as a nid and used the corresponding node. Because content of type 2 has vids that are way bigger than any nid, the rule could find the node.
Thank you very much for this great module!
Comment #5
ReneD CreditAttribution: ReneD commentedThanks KJumper for stating the obvious! :)
I corrected my blunder that I did not see and its working fine!
Yes! Thank you! Very great module.
Comment #6
bojanz CreditAttribution: bojanz commentedGood to know :)
Comment #7
snufkin CreditAttribution: snufkin commentedJust for the record I also had an issue with this, however I was using the correct bulk operation field. In my case I found out that if i display my results in a table where a certain field is sortable and I dont refresh after the bulk operation redirect the next assignment will get incorrect entries. Removing this sortable and just adding views sort seems to solve it.
Comment #8
PeteS CreditAttribution: PeteS commentedJust hit this issue as well, where I mistakenly selected "bulk operations: content revisions." Does it really work as designed? In my case I'm not using revisions for my nodes, but for whatever reason my nid's do not equal my vid's. So why is it attempting to load an entity based on "nid" but feeding in "vid?" Shouldn't it be loading based on the nid and passing in the vid? (E.g. in my case, say I have node 1 which has vid 2. Right now it's trying to load with nid 2 (which doesn't exist), and does not seem to be setting revisionKey for the entity that it's trying to load.)
This leads to scenarios where, presumably, it can't load the node (because the vid-as-nid doesn't exist) or it loads the wrong node. Also, it seems like VBO ought to handle the scenario of no items selected with some kind of error or warning.
Comment #9
bojanz CreditAttribution: bojanz commentedOpen a new issue, sounds unrelated.
Comment #10
PeteS CreditAttribution: PeteS commentedUh, I mean it may be a different specific cause, but it's 1000% related.
Comment #11
GaëlGI face the same problem. I selected "bulk operations : content" and unchecked "classable" for all my view's columns, but it still leads to a wrong selection. Some of my nodes have several revisions. Might it be a problem with exposed filters? Or the "nid = vid" problem? Or related to #1460154: Incorrect form values selected for operations? I'll investigate further.
Comment #12
bojanz CreditAttribution: bojanz commentedFirst confirm that you are running the latest 7.x-3.x-dev.
Comment #13
GaëlGNo, I use the 7.x-3.0-rc1. But I I reopened because it's not said in this thread that this bug is fixed in the latest dev.
Actually, I unchecked the "classable" option for columns but forgot to deal with the default sort radio button. When it's the same as the main sort, I can't reproduce. So I presume this is indeed related to #1460154: Incorrect form values selected for operations, which is fixed in the latest dev.
Comment #14
cdmo CreditAttribution: cdmo commentedWoah! This hit me today and the totally non-obvious solution of making sure there's a default sort on the table view did the trick. That was a weird one! Thanks all for the work on the module and the posted solution.