General developer forum

 
 
Picture of dim gou
Coding error detected, it must be fixed by a programmer: moodle_database::update_record_raw() id field must be specified.
 

Hello..

i suddenly take the following error

Coding error detected, it must be fixed by a programmer: moodle_database::update_record_raw() id field must be specified.

 The version that i can use is moodle-2.3.3

Whats happening? How i can fix? please help!!!

 
Average of ratings: -
Picture of Michael Schultz
Re: Coding error detected, it must be fixed by a programmer: moodle_database::update_record_raw() id field must be specified.
 

Hello Dim, I'm having the same issue in 2.3.3. It came on very suddenly with no apparent warning. I found this from a previous post: https://moodle.org/mod/forum/discuss.php?d=176568 but I haven't been able to fixthe problem yet either.

 
Average of ratings: -
Picture of Michael Schultz
Re: Coding error detected, it must be fixed by a programmer: moodle_database::update_record_raw() id field must be specified.
 

Hi again Dim, are you perchance using Amazon EC2 hosting? I'm working with them now. I've found a bit more information though I haven't resolved the issue yet.

I've also noticed the error is now: "Error reading from database" and I can't access my PHP Admin, though I can still get in through the console.

I hesitate to guess what it is this early on.

 
Average of ratings: -
Andrew Normore
Re: Coding error detected, it must be fixed by a programmer: moodle_database::update_record_raw() id field must be specified.
 

Hey, make sure you turn on debugging! That will tell me the exact file and line that is the problem. 

Site admin -> Debugging -> Developer

Post back with more details please! 

( This has nothing to do with Amazon servers by the way )

 
Average of ratings: -
Picture of Michael Schultz
Re: Coding error detected, it must be fixed by a programmer: moodle_database::update_record_raw() id field must be specified.
 

Hi Andrew,

I was unable to get into the site long enough to run debugging initially. The reason I asked about the hosting was that by rebooting the EC2 instance Moodle functioned long enough for me to access the site and run debugging.

Take a look at the attached text file to see the debugging log. There are some obvious issues; I'm just not sure the best resolution.

Thanks for your help.

 

 

 
Average of ratings: -
Picture of Michael Schultz
Re: Coding error detected, it must be fixed by a programmer: moodle_database::update_record_raw() id field must be specified.
 

Some more information that might be helpful:

I've made no recent changes to my config nor run any updates. I was able to launch a new EC2 instance using an image from about a week ago that seems to be running just fine, though an image from 2 days ago has the same problem. On the problem instance I can't access either Moodle or PHPMyAdmin, but if I reboot the server I can access both for roughly 2 minutes before I receive the following errors:

For Moodle I get: "Error reading from database"

For PHPMyAdmin: "Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly."

I've been using Moodle for 6 Years since 1.9 and have never had it just stop working unless there was a server issue. Again any info you have would be helpful. I can restore, but I'd like to prevent this from happening to myself and others again!

 
Average of ratings: -
Picture of Michael Schultz
Re: Coding error detected, it must be fixed by a programmer: moodle_database::update_record_raw() id field must be specified.
 

I've got no new information on this error. The day it first appeared I finally resorted to restoring the entire site from a backup. This restore had functioned properly since the date of my original posting.

Unofortunately, through no cause I can make sense of the same error suddenly reappeared without warning yesterday. I restored again and the site was running well, but it is again down today.

I hope someone comes across a solution to this. I'm at a loss.

 

 
Average of ratings: -