After choosing My account > Finances - error shown up:
Fatal error: Call to undefined method: stdClass->execute_display() in /home/users/akceleracja_testzion/www/zion/modules/marketplace/transactions.module on line 540

What could be wrong?

Comments

matslats’s picture

Status: Active » Postponed (maintainer needs more info)

Is it possible you don't have views installed?
Execute display is a views function.
Transaction.module is dependent on views

fudge714’s picture

I get a very similar error message on testsite/user/1/finances:

Fatal error: Call to undefined function: execute_display() in /var/www/vhosts/webellion.net/httpdocs/testsite/sites/default/modules/transactions/transactions.module on line 551

and I do have views installed.
any ideas? thanks

fudge714’s picture

I also get this error on the views main page (only after just visiting the user finances page and getting the error described above):

warning: Invalid argument supplied for foreach() in /var/www/vhosts/webellion.net/httpdocs/testsite/sites/default/modules/transactions/transactions.module on line 566.

line 566 is at a different point now since I've been editing, but it is the foreach line in:

function _get_transactions($where) {
  $args = func_get_args();
  $view = views_get_view('transactions_by_user');
  //need to remove the field which is also the argument, i.e. from_uid or to_uid
  foreach ($view->display['default']->display_options['fields'] as $i=>$field) {
    if ($field['relationship'] == $where['field']) {
      unset ($view->display['default']->display_options['fields'][$i]);
      break;
    }
  }
  //Change the column heading of 'amount' to be Income or Expenditure
  //and render the view with the right parameter
  if ($where['field'] == 'from_uid') {
    $view->display['default']->display_options['fields']['quantity']['label']=t('Expenditure');
	$table = $view->execute_display('default', array($where['uid']));
  } elseif ($where['field'] == 'to_uid') {
    $view->display['default']->display_options['fields']['quantity']['label']=t('Income');
    $table = $view->execute_display('default', array('all', $where['uid']));
  } else{
    drupal_set_message('wrong parameter sent to _get_transactions');
  }
  return $table;
}

I've also noticed that there is no view called 'transactions_by_user' listed on the views page and that maybe this is the issue. i can't find anywhere where this view is defined.

Also I noticed that strangely all three of my views tables are empty, even though there are other (standard) views enable and working on the site. I upgraded from rc1 to the latest views 6.x-2.0-rc3, but that doesnt make any difference.

matslats’s picture

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

This should all be fixed. It's to do with a change to the views 2.0 api that was made a few weeks ago. If your transactions module folder has a subfolder called includes, and you are still getting this error, then please write here again. Otherwise, get the latest build.

fudge714’s picture

I have got the includes folder in there, still doesnt work. tried enabling offers and wants (since the includes file seemed specific to that module), and that didnt fix it. Have definitely got the latest build as I just downloaded this version this afternoon.
and will look into the fixes you mentioned elsewhere, cheers..