1. I don't know if it's really not a View issue.
2. I'm using the recently available version listed above.
3. Screen shot included.

Drupal 7.2
OK
Access to update.php Protected
Info
CAPTCHA Already 0 blocked form submissions
OK
CTools CSS Cache Exists
OK
Configuration file Protected
OK
Cron maintenance tasks Last run 2 hours 31 min ago
You can run cron manually.
To run cron from outside the site, go to http://subdomain.sitename.com/cron.php?cron_key=7VX7QngwBrcAQavQs3WE4wlQ...
OK
Database system MySQL, MariaDB, or equivalent
OK
Database system version 5.1.54-1ubuntu4
OK
Database updates Up to date
OK
Drupal core update status Up to date
OK
File system Writable (public download method)
OK
GD library PNG support 2.0
OK
GD library rotate and desaturate effects 2.0
OK
Module and theme update status Up to date
OK
Node Access Permissions 14 permissions in use
If the site is experiencing problems with permissions to content, you may have to rebuild the permissions cache. Rebuilding will remove all privileges to content and replace them with permissions based on the current modules and settings. Rebuilding may take some time if there is a lot of content or complex permission settings. After rebuilding has completed, content will automatically use the new permissions. Rebuild permissions
OK
PHP 5.3.5-1ubuntu7.2 (more information)
OK
PHP extensions Enabled
OK
PHP memory limit 128M
OK
PHP register globals Disabled
OK
Unicode library PHP Mbstring Extension
OK
Update notifications Enabled
Info
Upload progress Not enabled
Your server is capable of displaying file upload progress, but does not have the required libraries. It is recommended to install the PECL uploadprogress library (preferred) or to install APC.
OK
Web server Apache/2.2.17 (Ubuntu)
OK
jQuery Update jQuery 1.5.2 and jQuery UI 1.8.11
--------------
Modules

Up to date
Advanced Forum 7.x-2.0-alpha1
Includes: Advanced Forum
Up to date
AntiSpam 7.x-1.1
Includes: AntiSpam
Up to date
Backup and Migrate 7.x-2.1
Includes: Backup and Migrate
Up to date
CAPTCHA 7.x-1.0-alpha3
Includes: CAPTCHA
Up to date
Captcha Riddler 7.x-1.2
Includes: Captcha Riddler
Up to date
Chaos tool suite 7.x-1.0-beta1
Includes: Chaos tools, Custom content panes, Custom rulesets, Page manager, Stylizer, Views content panes
Up to date
Domain Access 7.x-2.13
Also available: 7.x-3.x-dev (2011-Jun-24)
Download
Release notes
Includes: Domain Access, Domain Alias, Domain Configuration, Domain Content, Domain Navigation, Domain Settings, Domain Source, Domain Theme
Up to date
DrupalChat 7.x-1.x-dev (2011-Jun-24)
Includes: DrupalChat, DrupalChat Notifications
Up to date
Entity API 7.x-1.0-beta9
Includes: Entity API
Up to date
Google Analytics 7.x-1.2
Includes: Google Analytics
Up to date
Janrain Engage (formerly RPX) 7.x-2.0
Latest version: 7.x-2.1-beta2 (2011-Jun-23)
Download
Release notes
Includes: Janrain Engage Core, Janrain Engage UI, Janrain Engage Widgets
Up to date
jQuery Update 7.x-2.2
Includes: jQuery Update
Up to date
Kaltura 7.x-2.0-alpha1
Includes: Kaltura Module
Up to date
Libraries API 7.x-1.0
Also available: 7.x-2.x-dev (2011-Jun-21)
Download
Release notes
Includes: Libraries
Up to date
Masquerade 7.x-1.0-rc3
Includes: Masquerade
Up to date
Mollom 7.x-1.0
Includes: Mollom
Up to date
OpenTok Session Field 7.x-1.1-alpha1
Includes: OpenTok
Up to date
Organic groups 7.x-1.0
Latest version: 7.x-1.1-rc3 (2011-May-24)
Download
Release notes
Includes: Organic groups, Organic groups UI, Organic groups Views integration, Organic groups access control, Organic groups context, Organic groups field access, Organic groups node link, Organic groups register, Organic groups theme
Up to date
Panels 7.x-3.0-alpha3
Includes: Mini panels, Panel nodes, Panels, Panels In-Place Editor
Up to date
reCAPTCHA 7.x-1.7
Includes: reCAPTCHA, reCAPTCHA Mailhide
Up to date
User Relationships 7.x-1.0-alpha2
Includes: User Relationships
Up to date
Views 7.x-3.0-rc1
Includes: Views, Views UI

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

Status: Active » Fixed

This is fixed already in the dev version of advanced forum.

Status: Fixed » Closed (fixed)

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

dan1eln1el5en’s picture

I have this issue, I do not use advanced forum (though I found a few threads implying this is the issue) how do I locate with thing does this ?

dawehner’s picture

Which style do you use on your view?

yang_yi_cn’s picture

Status: Closed (fixed) » Active

I'm not using advance forum as well but are having this issue, I think it could be PHP 5.3 related?

when I try to render one row programatically, I got error:

Notice: Undefined property: view::$row_index in template_preprocess_views_view_fields() (line 188 ... views/theme/theme.inc

/**
 * Preprocess theme function to print a single record from a row, with fields
 */
function template_preprocess_views_view_fields(&$vars) {
  $view = $vars['view'];

  // Loop through the fields for this view.
  $previous_inline = FALSE;
  $vars['fields'] = array(); // ensure it's at least an empty array.
  foreach ($view->field as $id => $field) {
    // render this even if set to exclude so it can be used elsewhere.
    $field_output = $view->style_plugin->get_field($view->row_index, $id);  // <<<< here

Note that the strange part is that when I print the $view->row_index outside of the foreach loop it's defined, but when I print it inside the foreach loop it's not defined.

yang_yi_cn’s picture

I think I found the reason, it's hard to find the document so I'll just put it here:

it's in this very line
$field_output = $view->style_plugin->get_field($view->row_index, $id);

before this line, the $view->row_index is 0, after it, it becomes undefined. A deeper trace goes to views_plugin_styles.inc:

  function get_field($index, $field) {
    if (!isset($this->rendered_fields)) {
      $this->render_fields($this->view->result);
    }

    if (isset($this->rendered_fields[$index][$field])) {
      return $this->rendered_fields[$index][$field];
    }
  }

So, if I do the following:

$view = views_get_view('myview');
$view->execute();

I can get the results at this time, but they are not rendered, so if I call $view->style_plugin->row_plugin->render($row) to render the row, in this get_field() function it will try render the fields by " $this->render_fields($this->view->result); ", which is fine, but after this render_fields, the view's row_index will be unset.

So my work around is to call:

$view->render();

to render everything first, then in the get_field() function it will not try render it again and lost the index.

jurgenhaas’s picture

Version: 7.x-3.0-rc1 » 7.x-3.5

I do have the same issue with fields from the address module and with a global expression field. The latter one is part of the Views module I believe, so maybe just something like

    if (!isset($this->view->row_index)) {
      $this->view->row_index = 0;
    }

would globally solve the problem. Am I wrong?

xeraseth’s picture

Version: 7.x-3.5 » 7.x-3.x-dev
Status: Active » Needs review
FileSize
489 bytes

Hopefully this patch should solve the issue. get_field() uses render_field() which unsets $this->view->row_index. This causes issues if there are multiple fields within a single row. It should set the row_index after it is done rendering.

tokjanggut’s picture

Not fix

Chris Matthews’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

The 6 year old patch in #8 to views_plugin_style.inc does not apply to the latest views 7.x-3.x-dev and if still applicable needs reroll.

Checking patch plugins/views_plugin_style.inc...
error: while searching for:
  function get_field($index, $field) {
    if (!isset($this->rendered_fields)) {
      $this->render_fields($this->view->result);
    }

    if (isset($this->rendered_fields[$index][$field])) {

error: patch failed: plugins/views_plugin_style.inc:545
error: plugins/views_plugin_style.inc: patch does not apply
Andrew Answer’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
496 bytes

Patch rerolled.