I'm getting the following run-time error:

Notice: Undefined offset: 0 in views_megarow_preprocess_views_view_table() (line 148 of /var/www/drupal-7.20/sites/all/modules/views_megarow/views_megarow.module).
Notice: Undefined offset: 1 in views_megarow_preprocess_views_view_table() (line 148 of /var/www/drupal-7.20/sites/all/modules/views_megarow/views_megarow.module).
Notice: Undefined offset: 2 in views_megarow_preprocess_views_view_table() (line 148 of /var/www/drupal-7.20/sites/all/modules/views_megarow/views_megarow.module).
Notice: Undefined offset: 3 in views_megarow_preprocess_views_view_table() (line 148 of /var/www/drupal-7.20/sites/all/modules/views_megarow/views_megarow.module).
Notice: Undefined offset: 4 in views_megarow_preprocess_views_view_table() (line 148 of /var/www/drupal-7.20/sites/all/modules/views_megarow/views_megarow.module).
Notice: Undefined offset: 5 in views_megarow_preprocess_views_view_table() (line 148 of /var/www/drupal-7.20/sites/all/modules/views_megarow/views_megarow.module).
Notice: Undefined offset: 6 in views_megarow_preprocess_views_view_table() (line 148 of /var/www/drupal-7.20/sites/all/modules/views_megarow/views_megarow.module).
Notice: Undefined offset: 7 in views_megarow_preprocess_views_view_table() (line 148 of /var/www/drupal-7.20/sites/all/modules/views_megarow/views_megarow.module).
Notice: Undefined offset: 8 in views_megarow_preprocess_views_view_table() (line 148 of /var/www/drupal-7.20/sites/all/modules/views_megarow/views_megarow.module).
Notice: Undefined offset: 9 in views_megarow_preprocess_views_view_table() (line 148 of /var/www/drupal-7.20/sites/all/modules/views_megarow/views_megarow.module).

I tried to debug this by adding some output statements in the views_megarow_preprocess_views_view_table() function but my output statement never appear...not sure why as other output statement elsewhere works. Since that function is a hook implementation, perhaps the error is generated by the hook and the above error message is misleading?

All help is appreciated.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

monaw’s picture

Just as a test, I commented out the entire views_megarow_preprocess_views_view_table() function, flushed all cache and I'm still getting the above error...er help please...

monaw’s picture

Status: Active » Closed (won't fix)

Never mind, I was modifying a backup copy of the code, not the one actually in sites/all/modules/views_megarow/... duh!

monaw’s picture

Version: 7.x-1.2 » 7.x-1.3

I'm still getting those run-time error messages after upgrading to 1.3:

Notice: Undefined offset: 0 in views_megarow_preprocess_views_view_table() (line 172 of /drupal/sites/all/modules/views_megarow/views_megarow.module).
Notice: Undefined offset: 1 in views_megarow_preprocess_views_view_table() (line 172 of /drupal/sites/all/modules/views_megarow/views_megarow.module).
Notice: Undefined offset: 2 in views_megarow_preprocess_views_view_table() (line 172 of /drupal/sites/all/modules/views_megarow/views_megarow.module).
Notice: Undefined offset: 3 in views_megarow_preprocess_views_view_table() (line 172 of /drupal/sites/all/modules/views_megarow/views_megarow.module).
Notice: Undefined offset: 4 in views_megarow_preprocess_views_view_table() (line 172 of /drupal/sites/all/modules/views_megarow/views_megarow.module).
[...]

Back in 1.1, I added the following hack which worked:

    if ( empty ( $result_entities[1] ) )
    {
        $results = $vars['view']->result;
        //fwrite ( $debug, "results : " . print_r ( $results, TRUE ) . "\n" );
        foreach ( $results as $result )
            $result_entities[1][] =
                $result->_field_data['field_log_client_node_nid']['entity'];
    }

but this hack doesn't work for 1.2 nor 1.3.

Please help!

monaw’s picture

Status: Closed (won't fix) » Active
Artusamak’s picture

Category: Bug report » Support request
Status: Active » Needs work

Let's start with the beginning, how do you reproduce the bug with an installation from scratch?

monaw’s picture

> Let's start with the beginning, how do you reproduce the bug with an installation from scratch?

Ok, I'll get back to you as soon as I can...

Artusamak’s picture

Status: Needs work » Closed (cannot reproduce)

Please reopen when you will have more information.

absoludo’s picture

I enabled the module had four fields (one hidden) and had no labels for each field.
After a quick debug I noticed the array in $result_entities[1] was empty.
Therefore I created this simple patch.

smurfxx’s picture

Patch #8 works, I had the same problem using entity referenced fields.