When editing a view, the Tripletex User id field does not map to a user object with corresponding properties.

Comments

stenjo’s picture

A typo in the fields declarations in tripletex.views.inc caused this to mess everything up.
To join with users table, the hook_views_data() should at least contain


    // Join with user table
    'users' => array(
      'table' => array(
        'tripletex_invoice' => array(
          'group' => t('Tripletex'),
          'join' => array(
            'left_field' => 'uid',
            'field' => 'uid',
          ),
        ),
      ),
    ),

I am still getting the errors when viewing the list of invoices created by Views:
Notice: Undefined property: stdClass::$broken in views_handler_field_node->render_link() (line 52 of /var/www/d6/sites/all/modules/views/modules/node/views_handler_field_node.inc).
And thinking this might have something to do with how the field nid is defined in tripletex.views.inc line

      'nid' => array(
        'title' => t('Node Id'),
         'help' => t('Node ID to which the invoice is attached.'),
        // Information for displaying the nid
        'field' => array(
          'handler' => 'views_handler_field_node',
          'click sortable' => TRUE,
        ),
        // Information for accepting a nid as an argument
        'argument' => array(
          'handler' => 'views_handler_argument_node_nid',
          'name field' => 'title', // the field to display in the summary.
          'numeric' => TRUE,
          'validate type' => 'id',
        ),
        // Information for accepting a nid as a filter
        'filter' => array(
          'handler' => 'views_handler_filter_numeric',
        ),
        // Information for sorting on a nid.
        'sort' => array(
          'handler' => 'views_handler_sort',
        ),
      ),

Ideas anyone?

stenjo’s picture

Status: Active » Fixed

Issue seems to be fixed with views 3 and latest dev.

Status: Fixed » Closed (fixed)

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