Drupal 7 Views 3 column names must be lower case

Posted on June 6th, 2010 by David Luhman and tagged , .

I'm just getting my feet wet with the Drupal 7, Views 3 hook_views_data API which describes a table to Views.

I had a table like this :


create table tbl(
  myid    varchar(30) COMMENT 'Primary key',
  myPrice float
)

I was getting an error of this form when I was trying to display the view :


Undefined property: stdClass::$tbl_myPrice in
 views_handler_field_numeric->render() (line 75 of 
/drupal7/sites/all/modules/views/handlers/views_handler_field_numeric.inc).

Renaming the table to my_price solved the problem.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options