Warning: Invalid argument supplied for foreach() in xero_admin_settings() (line 94 of /var/www/be/sites/all/modules/xero/xero.admin.inc).
Notice: Undefined variable: account_options in xero_admin_settings() (line 104 of /var/www/be/sites/all/modules/xero/xero.admin.inc).

I am getting the above error when saving the consumer and secret keys in the Xero configuration section. I understand what the messages mean as no default account has been selected, but I am unaware of how to select a default account when the list is empty. WHere is this being populated from?

Thanks for any help

Comments

mradcliffe’s picture

With the keys saved, the Xero admin settings page tries to contact Xero to get a list of Accounts, and then put them in a select list.

This could happen either if

  • the request failed
  • or there are no Accounts in the Company on Xero

I think the request failed. If you go to the Recent Log Messages page (if Database Logging module is installed), then you should see any errors that happened during Xero requests.

jeremymcminn’s picture

Thanks! Managed to get it working fine now. Module works a treat, thank you.

mradcliffe’s picture

Category: Bug report » Support request
Status: Active » Fixed

Closing issue.

Status: Fixed » Closed (fixed)

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