creted and got this error

Notice: Undefined variable: nids in views_plugin_row_node_rss->pre_render() (line 60 of D:\xampp\htdocs\d7allsaints\sites\all\modules\views\modules\node\views_plugin_row_node_rss.inc).
CommentFileSizeAuthor
#1 1109564-row_node_rss-notice.patch616 bytesdawehner
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)
FileSize
616 bytes

Does this patch works for you?

In general do you get any results in this feed?

artatac’s picture

Yes getting results
http://venturacottage.homedns.org/d7allsaints/user
webmaster
aa
If you want to look yourself

dawehner’s picture

Status: Postponed (maintainer needs more info) » Active

Update status.

artatac’s picture

Status: Active » Postponed

Started with a fresh install and am rebuilding currently cannot reproduce error

merlinofchaos’s picture

Status: Postponed » Closed (cannot reproduce)

Let's use this status for now; it's a better descriptor.

BrightBold’s picture

Status: Closed (cannot reproduce) » Needs review

I am getting the same error after installing the WP_Blog module, which created the following view:

$view = new view;
$view->name = 'wp_blog';
$view->description = 'A blog archive with features similar to those provided by WordPress.';
$view->tag = '';
$view->base_table = 'node';
$view->human_name = 'WP Blog archive';
$view->core = 7;
$view->api_version = '3.0-alpha1';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Defaults */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->display->display_options['title'] = 'Blog';
$handler->display->display_options['access']['type'] = 'none';
$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['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'node';
$handler->display->display_options['row_options']['links'] = 0;
$handler->display->display_options['row_options']['comments'] = 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';
/* Contextual filter: Content: Created year */
$handler->display->display_options['arguments']['created_year']['id'] = 'created_year';
$handler->display->display_options['arguments']['created_year']['table'] = 'node';
$handler->display->display_options['arguments']['created_year']['field'] = 'created_year';
$handler->display->display_options['arguments']['created_year']['title_enable'] = 1;
$handler->display->display_options['arguments']['created_year']['title'] = 'Blog: %1';
$handler->display->display_options['arguments']['created_year']['breadcrumb_enable'] = 1;
$handler->display->display_options['arguments']['created_year']['breadcrumb'] = '%1';
$handler->display->display_options['arguments']['created_year']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['created_year']['summary']['format'] = 'default_summary';
/* Contextual filter: Content: Created month */
$handler->display->display_options['arguments']['created_month']['id'] = 'created_month';
$handler->display->display_options['arguments']['created_month']['table'] = 'node';
$handler->display->display_options['arguments']['created_month']['field'] = 'created_month';
$handler->display->display_options['arguments']['created_month']['title_enable'] = 1;
$handler->display->display_options['arguments']['created_month']['title'] = 'Blog: %2 %1';
$handler->display->display_options['arguments']['created_month']['breadcrumb_enable'] = 1;
$handler->display->display_options['arguments']['created_month']['breadcrumb'] = '%2';
$handler->display->display_options['arguments']['created_month']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['created_month']['summary']['format'] = 'default_summary';
/* Contextual filter: Content: Created day */
$handler->display->display_options['arguments']['created_day']['id'] = 'created_day';
$handler->display->display_options['arguments']['created_day']['table'] = 'node';
$handler->display->display_options['arguments']['created_day']['field'] = 'created_day';
$handler->display->display_options['arguments']['created_day']['title_enable'] = 1;
$handler->display->display_options['arguments']['created_day']['title'] = 'Blog: %3 %2 %1';
$handler->display->display_options['arguments']['created_day']['breadcrumb_enable'] = 1;
$handler->display->display_options['arguments']['created_day']['breadcrumb'] = '%3';
$handler->display->display_options['arguments']['created_day']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['created_day']['summary']['format'] = 'default_summary';
/* 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';
/* 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(
  'wp_blog' => 'wp_blog',
);

/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->display->display_options['path'] = 'blog';

/* Display: RSS Feed */
$handler = $view->new_display('feed', 'RSS Feed', 'feed_1');
$handler->display->display_options['defaults']['title'] = FALSE;
$handler->display->display_options['title'] = 'Blog';
$handler->display->display_options['pager']['type'] = 'some';
$handler->display->display_options['style_plugin'] = 'rss';
$handler->display->display_options['row_plugin'] = 'node_rss';
$handler->display->display_options['path'] = 'blog/rss';
$handler->display->display_options['displays'] = array(
  'page_1' => 'page_1',
  'default' => 0,
);
$handler->display->display_options['sitename_title'] = 1;
$translatables['wp_blog'] = array(
  t('Defaults'),
  t('Blog'),
  t('more'),
  t('Apply'),
  t('Reset'),
  t('Sort by'),
  t('Asc'),
  t('Desc'),
  t('Items per page'),
  t('- All -'),
  t('Offset'),
  t('All'),
  t('Blog: %1'),
  t('%1'),
  t('Blog: %2 %1'),
  t('%2'),
  t('Blog: %3 %2 %1'),
  t('%3'),
  t('Page'),
  t('RSS Feed'),
);

Patch in #1 seems to solve it.

Bevan’s picture

Title: Undefined variable: nids in views_plugin_row_node_rss->pre_render() (line 60 of .../views/modules/node/views_plugin_row_node_rss » rss feed view

I tested this and confirmed it fixes the bug where a Feed display with no rows causes an error like "Undefined variable: nids in views_plugin_row_node_rss->pre_render() (line 60 of .../modules/views/modules/node/views_plugin_row_node_rss.inc".

The patch is clean and meets code standards. Further, this is a simple fix. I am marking as RTBC.

I marked #1134416: nids in views_plugin_row_node_rss->pre_render() (line 60 as duplicate.

Bevan’s picture

Title: rss feed view » Undefined variable: nids in views_plugin_row_node_rss->pre_render() (line 60 of .../views/modules/node/views_plugin_row_node_rss
Status: Needs review » Reviewed & tested by the community
dawehner’s picture

Title: rss feed view » Undefined variable: nids in views_plugin_row_node_rss->pre_render() (line 60 of .../views/modules/node/views_plugin_row_node_rss

There should be no pre_render called when there is not result, or?

Perhaps there is a use case to alter the values if there are none.

Bevan’s picture

Well, the Feed's URL should still return valid RSS+XML even if there are no items. I do not know if/how that affects whether pre_render should be called or not...

dynamicdan’s picture

I also got the error randomly.. What also concerns me is that the default drupal functionality of showing the content related to a term is not working...
mysite/tags/fish should show me content tagged with fish. Am I missing something here?
Do I have to now specify what should happen with mysite/tags/[extra-url-parts] ?

merlinofchaos’s picture

Status: Reviewed & tested by the community » Fixed

I think pre_render() is called on the style even with no rows. Committed this patch.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

marco71’s picture

Is this the final patch for this issue?

And does this fix also "Style RSS Feed requires a row style but the row plugin is invalid." error?
As was suggested on http://www.drupalgardens.com/content/feed-error-style-rss-feed-requires-....

I am using Views 7.x-3.0-rc1 and this error below is showing up there.
"Style RSS Feed requires a row style but the row plugin is invalid."

dawehner’s picture

Mh this patch is about the notice not about having a rss row plugin for users.
I'm not sure whether there exists a feature request for that, but .... the final patch is above.

marco71’s picture

Tnx for the reply,
Do you know if your patch is already in 7.x-3.0-rc1?

Also the error looks different from mine and actually doesn't mean the same.
Probably my error isn't the same problem... hmmm.

I guess I need to dive in more :-)

dawehner’s picture

It should be part of the RC1. If it's not just use the dev version and be happy :)

marco71’s picture

Thank you ;-) Most mod already in dev anyway so it's in good company.