Getting this message after updating dev version to the latest one (March 28th)

Notice: Undefined index: base table in views_handler_field_field->query() (line 80 of /Applications/MAMP/htdocs/drupal/sites/all/modules/views/modules/field/views_handler_field_field.inc).
# Notice: Undefined index: in views_handler_field_field->query() (line 110 of /Applications/MAMP/htdocs/drupal/sites/all/modules/views/modules/field/views_handler_field_field.inc).
# Notice: Undefined index: entity keys in views_handler_field_field->query() (line 115 of /Applications/MAMP/htdocs/drupal/sites/all/modules/views/modules/field/views_handler_field_field.inc).

Is this a known issue or does it have something to do with my install?

Comments

dopedwizard’s picture

Status: Active » Fixed

Ok I had the examples for developers module installed. Deactivated it and the error message disappeared.

Thank you.

HunterT’s picture

I'm getting the error and I don't have examples for developers module installed at all. What module is this? does it come with ctools? Does anyone know of any other things that cause this error?

HunterT’s picture

Actually, just read that you have to clear cache. Once I did this everything works fine, no errors.

jessetechie’s picture

Status: Fixed » Active

I'm getting this error too. I don't have the examples for developers module installed, and I have cleared the cache twice to no avail. So I guess I'll be the token noob who says "I tried all of that and it still doesn't work!"

I have an "Events" content type with Title, Description, and Date (via the Date module) fields. Then I have a View based on that content type which define a Page and a Block. Pretty straightforward.

I'd like the Block to display a list of events in the format [date] [title], i.e. "4/3/2011 Seminar". So I added the Date field to the "Fields" section on the View's Block configuration. And that's when I started getting this error.

It's actually accompanied by a database error as well, and I don't know if these are related or not, but here it is:

Debug:

'Exception: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'AS expression, \'\' AS field_data_field_date__entity_type
FROM 
node node
LEFT JOI\' at line 1'

in views_plugin_query_default->execute() (line 1354 of /var/www/drupal7/sites/all/modules/views/plugins/views_plugin_query_default.inc).

A little more digging found the reason for this error -- this query is missing an actual column to go with the "expression" alias:

SELECT ...
node.title AS node_title, 
node.nid AS nid, 
node.created AS node_created, 
AS expression,                <-- no column name here
'' AS field_data_field_date__entity_type 
FROM {node} node 
LEFT JOIN {field_data_field_date} field_data_field_date 
...

And that's about as far as I can go without getting knee-deep in the Views module. I'm not sure if it's a bug in Views (or in Date for that matter) or something I've done wrong. Any help you can provide would be great!

Thanks in advance,

Jesse

bojanz’s picture

Status: Active » Closed (fixed)

1. It's not an error, it's a notice, and it's fixed in latest -dev.
2. Sounds like a date bug to me.
3. Retest with latest dev versions of Views and Date (7.x-2.x), if it still fails open an issue in the date issue queue.

jessetechie’s picture

1. Picky, picky! :)
2. I came back to this page after getting the notice (and the database error) again when adding Body to the Fields. So this was not just a Date issue.
3. Pulled down the latest -dev and it's working fine now. I had been using -beta3.

Thanks!

Jesse

Carlos Miranda Levy’s picture

This is solved in dev version. The error happens on beta-3. Just upgrade to dev.

clasie’s picture

Hi,
I got those notices (but the card stop showing) when I add a product on a card:

Notice : Undefined index: commerce_line_item dans views_handler_field_field->access() (ligne 78 dans /homez.547/equisele/www/profiles/commerce_kickstart/modules/views/modules/field/views_handler_field_field.inc).
Notice : Undefined index: commerce_line_item dans views_handler_field_field->query() (ligne 134 dans /homez.547/equisele/www/profiles/commerce_kickstart/modules/views/modules/field/views_handler_field_field.inc).
Notice : Undefined index: entity keys dans views_handler_field_field->query() (ligne 146 dans /homez.547/equisele/www/profiles/commerce_kickstart/modules/views/modules/field/views_handler_field_field.inc).

When I delete card content and refresh the notice disappeard. I add again a prod to the card and notices came back.

Any clue or suggestion?

Thank you
Clasie

My system: Commerce Kickstart (commerce_kickstart-7.x-1.9) Drupal7.15