After download and install I get this error:

Fatal error: Call to undefined function update_sql() in E:\xampplite\htdocs\drupal5\sites\all\modules\regcode\regcode.install on line 57

Note: Marking as critical because it's a release version and doesn't install.
Note 2: If you don't have time to test your own module, neither I. Too many errors for me, I give up.

Comments

aidanlis’s picture

Hi ilo,

Thanks for testing the D5 module! I've been working on the D6 one all night (just put out a release).

update_sql appears to be a core function in D5 (see http://api.drupal.org/api/function/update_sql/5), It seems odd that the function is undefined for you. It's listed as the best practice method here: http://drupal.org/node/51220

If you do have some spare time, it would be good if you can work out what's going on. I don't plan on supporting the D5 module at all, so would love to have you on board for this!

Cheers,
Aidan

ilo’s picture

mmm Yes, the funciton is in core, and it works, but it's in the update.php file, and is available within the scope of an update operation, not during normal drupal execution, so it can be used in update hooks, but not during install/uninstall.

According to best practice method, the update_sql function is under the "Update instructions" topic.

I guess it's a bad usage of the function, nothing to do with my setup.

aidanlis’s picture

Hi,

Ah thanks for checking that out. Do you have time to provide a patch? I could really use your help on this.

Thanks,

danielnolde’s picture

Of course, you're right.
I'll rework the regcode_install db calls to use a regular functions.

Thanks for the testing and the feedback!

miss-susan’s picture

Has a fix be published for this yet? I'm getting the same error.

aidanlis’s picture

Status: Active » Fixed

I've given up on danielnolde fixing this bug ... it's been open over a month.

I downloaded drupal5, changed update_sql to db_query and the module seems to work. I'm closing this bug and releasing a new version of the software.

Cheers,

danielnolde’s picture

ARGH, sorry for the long delay, everybody. Sorry Aidan for letting you down on this.
You waited for this crucial fix, and i ignored it as low-priority.
(strangely i don't get updates on this issue via mail).

Thanks, Aidan, for doing the work and more so for releasing the new version!
I hope the development of this version will be useful for many users.
If you like the D5.x-3.2 version and its feature set, a colleague finished a direct 1-on-1 port for D6 (D6.x-3.2) and can test and upload it by next week (and she tend's to be more dependable than me <:} )

thanks and happy usage for regcode.module-5.x-3.2!

cheers,

daniel

aidanlis’s picture

Status: Fixed » Closed (fixed)