I'm getting this notice error often, also shows up after an update.php process has completed:

Notice: Undefined index: entity type in views_handler_field_entity->init() (line 44 of /home/account/public_html/drupal/sites/all/modules/views/handlers/views_handler_field_entity.inc).

CommentFileSizeAuthor
#7 views problem.png25.85 KBdeanflory
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

damiankloip’s picture

Status: Active » Postponed (maintainer needs more info)

Do you have an export of your view you can attach?

deanflory’s picture

Well, it's happening on the landing of a successful update.php process completing, which doesn't have any of my views on it. The only thing I can think of is there is a countdown module (Maintenance Countdown 7.x-1.x-dev) that appears to have modified the look of maintenance/site offline page(s) as well as the update.php pages. Or it may be AdaptiveTheme.

esmerel’s picture

Can you try using a core theme or disabling one at a time to narrow that down, maybe?

esmerel’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
deanflory’s picture

I'm still getting these, going to try recreating all my views one at a time to see if it goes away.

Notice: Undefined index: entity type in views_handler_field_entity->init() (line 44 of /.../drupal/sites/all/modules/views/handlers/views_handler_field_entity.inc).
• Notice: Undefined index: entity type in views_handler_field_entity->init() (line 44 of /.../drupal/sites/all/modules/views/handlers/views_handler_field_entity.inc).
• Notice: Undefined index: users in views_handler_field_field->access() (line 127 of /.../drupal/sites/all/modules/views/modules/field/views_handler_field_field.inc).
• Notice: Undefined index: users in views_handler_field_field->access() (line 127 of /.../drupal/sites/all/modules/views/modules/field/views_handler_field_field.inc).
• Notice: Undefined index: users in views_handler_field_field->access() (line 127 of /.../drupal/sites/all/modules/views/modules/field/views_handler_field_field.inc).

ycshen’s picture

I think this bug is duplicate the #1950762: Breaks when adding "sign-up" link to view
It's a real bug.

deanflory’s picture

FileSize
25.85 KB

When doing module updates it shows up after update.php runs and reports the results, and I'm using the Seven admin theme and there are no signups in any way on the udpate.php results page:

SEE IMAGE

deanflory’s picture

Still having this issue but still have not tried recreating my views.

VValdo’s picture

Issue summary: View changes

FWIW, enabling the Entity API module, then removing and readding the signup to the view seems to have quieted this error down. Looks like the signup module should be checking for entity API module as a dependency or something.

saltednut’s picture

We're seeing these (or similar) during the normal install process of install profiles. Using latest dev of views. It just shows up during the batch and nothing seems broken from my observations.

BassPlaya’s picture

Hey guys, I just found this thread (issue) here because I had the same. I don't think it is related to the signup module but probably related to 'exposed filters'. I had this view with 3 exposed filters and I got 3 error messages on that page view.

Undefined index: entity type in views_handler_field_entity->init() line 44 of sites/all/modules/views/handlers/views_handler_field_entity.inc

I thought that was strange and deleted the filters. Saved the view. Cleared the cache. Nothing happened. So I added them back in and then the errors disappeared. So I guess you might wanna look into exposed filters.
FYI: the 3 exposed filters were: 2 fields based on a select list, and a filter based on the user role.
Hope that helps.

BassPlaya’s picture

Er ... it seems that I do get those errors back when I've just edited my view (a VBO) but after refreshing the page, they're gone. (for now)

siramsay’s picture

I am getting the same on one of my development install, not happening on production.

views 7.x-3.8

I get it when flushing cache on and on running update.php

saltednut’s picture

Status: Closed (cannot reproduce) » Active

Although I agree this is hard to reproduce, it's still really happening at times. I often see it on Features pages and it happens literally every time I install Views.

rcodina’s picture

I also reproduce the problem with this configuration:

Drupal 7.34
Ctools 7.x-1.6
Views 7.x-3.10
Entity 7.x-1.6
Entity tokens 7.x-1.6
Entity Reference 7.x-1.1
Multiple Entity Form 7.x-1.2

hoosk’s picture

Me and @rcodina have found out that this problem is caused by Simplenews module (7.x-1.1) which makes following variable to be empty:

$table_data['table']['entity type']

To know which module causes this problem we have added an if with a dsm instruction. Also, to workaround the problem, we have added an if with !empty function.

/**
   * Initialize the entity type.
   */
  public function init(&$view, &$options) {
    parent::init($view, $options);

    // Initialize the entity-type used.
    $table_data = views_fetch_data($this->table);
    /*if(empty($table_data['table']['entity type'])){
	     dsm($table_data['table']);
    }*/
   
    if(!empty($table_data['table']['entity type'])){  //workaround
	      $this->entity_type = $table_data['table']['entity type'];
    }
  
  }
rcodina’s picture

I think views module should be patched to add the if with the "empty" function to avoid problems like this one. This time is simplenews module, next time can be another module. So this should be handled in views module. It's just and if sentence.

CmKeen’s picture

The issue is indeed in Simplenews that don't set the right element but it seems that the bug has not been resolved in Simplenews yet.
Did anyone found a patch in Simplenews?

UksusoFF’s picture

I just updated to 7.x-3.15 and got same error when database update. Should I re run update after this error? Or any manual work in SQL?

delacosta456’s picture

hi @CmKeen
Effectively it looks like it concern simplenews .. and on my own side below is what has help (hope it is definitely):

- On your content type , delete the field_simplenews_term
-On content type at /admin/structure/types/manage/(your-content-type) in the Publishing options tab, UNCHECK Use as simplenews newsletter and save
(active tab)
- drush cc all (clear all cache) (twice)
- Go back to /admin/structure/types/manage/(your-content-type) in the Publishing options tab, AND RE-CHECK Use as simplenews newsletter and save..
- drush cc all (clear all cache) (twice) to verify error has gone

thanks

GemQueen’s picture

I just started getting this problem on two websites after updating Views to the latest. Neither one have SimpleNews installed.

jukka792’s picture

I just started getting this problem on one site in a multisite installation after running update.php. Updated these modules using Drush:
imce 7.x-1.10
jquery_update 7.x-3.0-alpha5
l10n_update 7.x-2.1
s3fs 7.x-2.10
views_bulk_operations 7.x-3.4

(Views module version is 7.x-3.15 (didn't update it yet to the latest version which is now 7.x-3.16)
Also I do not have SimpleNews installed.

taylormadeapps’s picture

I rolled back views_bulk_operations 7.x-3.4 to 7.x-3.3 as this was the only upgraded module on my sites that matched with @jukka792 the warning is no longer presented to me after the rollback.
I hope this is of some help

Agileware’s picture

> I rolled back views_bulk_operations 7.x-3.4 to 7.x-3.3 as this was the only upgraded module on my sites that matched with @jukka792 the warning is no longer presented to me after the rollback.

@taylormadeapps you're a legend mate! That worked for me.

dat deaf drupaler’s picture

Project: Views (for Drupal 7) » Views Bulk Operations (VBO)
Version: 7.x-3.x-dev » 7.x-3.4
Component: Code » Core

Confirmed rolling back from views_bulk_operations 7.x-3.4 to 7.x-3.3 had stopped this error -- D7 running on 7.0 PHP

INAScon’s picture

I haven't upgraded to views_bulk_operations 7.x-3.4 yet and have this same issue in 7.x-3.3.

joelpittet’s picture

Version: 7.x-3.4 » 7.x-3.x-dev

Can you try the dev release?

joelpittet’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: +Needs steps to reproduce

It's a full release now in 3.5.

Please provide a clear set of steps to reproduce the problem

dat deaf drupaler’s picture

The error and warning haven't appeared since then... can close this issue if another person could confirm?

joelpittet’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

Thank you for letting me know.

dat deaf drupaler’s picture

Project: Views Bulk Operations (VBO) » Views (for Drupal 7)
Component: Core » Code
Status: Closed (outdated) » Closed (duplicate)
Issue tags: -Needs steps to reproduce

This issue had came back and been linger around for couple months before I found this patch which solved this issue.

https://www.drupal.org/project/views/issues/1364064#comment-12589172