Error with Certificate 2.3 upgrade

Error with Certificate 2.3 upgrade

by Michael Lewis -
Number of replies: 4

I'm receiving an error message when attempting to upgrade to Certificate 2.3.

My environment is:

Moodle 2.3.1-latest, Windows Server 2008, IIS, MSSQL 2008, PHP 5.3.15

Here is the error text (screen grab also attached):

mod_certificate

Error Code: 8155<br>
Message: [Microsoft][SQL Server Native Client 10.0][SQL Server]No column name was specified for column 1 of 't'.<br>

DELETE
FROM mdl_certificate_issues
WHERE id NOT IN (SELECT * FROM (SELECT MAX(id)
FROM mdl_certificate_issues
GROUP BY certificateid, userid) as t)
[array (
)] 
Error code: dmlwriteexception
Stack trace:
  • line 410 of \lib\dml\moodle_database.php: dml_write_exception thrown
  • line 258 of \lib\dml\sqlsrv_native_moodle_database.php: call to moodle_database->query_end()
  • line 365 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->query_end()
  • line 740 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->do_query()
  • line 374 of \mod\certificate\db\upgrade.php: call to sqlsrv_native_moodle_database->execute()
  • line 627 of \lib\upgradelib.php: call to xmldb_certificate_upgrade()
  • line 358 of \lib\upgradelib.php: call to upgrade_plugins_modules()
  • line 1524 of \lib\upgradelib.php: call to upgrade_plugins()
  • line 329 of \admin\index.php: call to upgrade_noncore()
Attachment Screen shot 2012-07-25 at 10.27.36 PM.png
Average of ratings: -
In reply to Michael Lewis

Re: Error with Certificate 2.3 upgrade

by Mark Nelson -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Michael,

Doh! Thanks for this. I do not have a SQL server running on my local machine, so missed this issue when performing test upgrades. I will have to re-write the query to work on all databases.

I have created a tracker issue for this at  http://tracker.moodle.org/browse/CONTRIB-3811

Regards,

Mark

Average of ratings: Useful (1)
In reply to Mark Nelson

Re: Error with Certificate 2.3 upgrade

by Michael Lewis -

Mark, I appreciate your follow-up and work. As a contribution to the Moodle community I'm trying to persuade my bosses to make available one of our Windows-based development servers so that Moodle developers such as yourself have somewhere to test.

Let me know if that would be helpful to your efforts.

In reply to Michael Lewis

Re: Error with Certificate 2.3 upgrade

by Mark Nelson -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Michael,

That would definitely be handy. I run Linux when developing, so it's a nuisance having to test on MSSQL as well.

However, not sure how you would prevent the server from being abused by others on the internet if you were to make it public for Moodle developers to test on.

Regards,

Mark

In reply to Michael Lewis

Re: Error with Certificate 2.3 upgrade

by Mark Nelson -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Michael,

I have written a fix for this which I will push shortly to the github repository.

Regards,
 
Mark