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.
Hi. when i use rules_link with in views that use views_php i get this error:
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /en/admin/structure/views/view/list_for_unpublish/preview/page/ajax
StatusText: Internal Server Error
ResponseText: EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7894 of /yourwebsitepath/includes/common.inc).
for reproduce import this rules_link and views
first import rules_link
{
"settings" : {
"text" : "\u062e\u0631\u0648\u062c \u0627\u0632 \u0627\u0646\u062a\u0634\u0627\u0631",
"link_type" : "token",
"bundles" : [],
"entity_link" : 1
},
"name" : "unpublish_contetn",
"label" : "unpublish contetn",
"path" : "unpublish_contetn",
"entity_type" : "node",
"rdf_mapping" : []
}
then import views
$view = new view();
$view->name = 'list_for_unpublish';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'list for unpublish';
$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'] = 'list for unpublish';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$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'] = 'table';
$handler->display->display_options['style_options']['columns'] = array(
'title' => 'title',
);
$handler->display->display_options['style_options']['default'] = '-1';
$handler->display->display_options['style_options']['info'] = array(
'title' => array(
'sortable' => 0,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
'empty_column' => 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']['word_boundary'] = FALSE;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
/* Field: Content: unpublish contetn */
$handler->display->display_options['fields']['unpublish_contetn']['id'] = 'unpublish_contetn';
$handler->display->display_options['fields']['unpublish_contetn']['table'] = 'views_entity_node';
$handler->display->display_options['fields']['unpublish_contetn']['field'] = 'unpublish_contetn';
$handler->display->display_options['fields']['unpublish_contetn']['rules_link'] = array(
'rules_link_parameters' => '',
'rules_link_rewrite' => '',
);
/* 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: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Filter criterion: Global: PHP */
$handler->display->display_options['filters']['php']['id'] = 'php';
$handler->display->display_options['filters']['php']['table'] = 'views';
$handler->display->display_options['filters']['php']['field'] = 'php';
$handler->display->display_options['filters']['php']['use_php_setup'] = 0;
$handler->display->display_options['filters']['php']['php_filter'] = 'if (!$row->title) {
return TRUE;
}';
/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'list-for-unpublish';
$translatables['list_for_unpublish'] = array(
t('Master'),
t('list for unpublish'),
t('more'),
t('Apply'),
t('Reset'),
t('Sort by'),
t('Asc'),
t('Desc'),
t('Items per page'),
t('- All -'),
t('Offset'),
t('« first'),
t('‹ previous'),
t('next ›'),
t('last »'),
t('unpublish contetn'),
t('Page'),
);
i create a issue for that in views_php: https://www.drupal.org/node/2673034
Comments