currency_api_get_list() redeclare problem

Posts: 69
Joined: 01/23/2008

If you try to enable the curreny module on a drupal that has the ubercart already installed you will get the following error.

Fatal error: Cannot redeclare currency_api_get_list() (previously declared in D:\xampp\htdocs\drupal56\modules\ubercart\uc_store\uc_store.module:2703) in D:\xampp\htdocs\drupal56\modules\currency\currency_api\currency_api.module on line 471

Posts: 5367
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Hmm... yeah, Lyle it might be better to use a module_exists call if possible here. In the meantime, I believe you can solve this trouble by setting the weight for the currency module to be a negative number so it gets loaded before the store module.

Posts: 2267
Joined: 08/07/2007
AdministratoreLiTe!

*sigh* Didn't think that the currency_api module would be loaded after uc_store.

Posts: 69
Joined: 01/23/2008

Exactly this was the issue. By the way, the funtion body of the currency modules currency_api_get_list() function differs form ubercart currency_api_get_list() function.