Error writing to database

Error writing to database

by luna moon -
Number of replies: 4

Hi,

Does anyone knows how can I fix the 'Error Writing to Database'........Since the past week I've tried to update a profile as an Administrator and once I click the update button it gives me that error.  I have checked about every files within Moodle and no luck. I have done research but have not gotten anything that could guide me to solve this issue. Weird thing is that it only happens when I sign in as admin and try to update a user profile but once I sign in with a different account and try to update a profile it does not give me the error. Any ideas????....I hope with your help I can get it fix and definitely will appreciate it. 

Btw could it possible that this error shows up because we added custom user profile fields??? I do not know exactly how that works or where is stored since I've tried to locate them but do not know or have a clue where they are being stored.

 

smileLuna

Attachment Error_Writing_to_database.png
Average of ratings: -
In reply to luna moon

Re: Error writing to database

by Luis de Vasconcelos -

Turn on Debugging and you will get a bit of extra information with that "Error writing to database" message. That should help track down the problem.

Did you make any changes to your Moodle environment (web server, database, Moodle code, etc.) before you started getting this error?

In reply to Luis de Vasconcelos

Re: Error writing to database

by luna moon -

Hi Luis,

From what I can remember my co-worker created a custom profile field and made them required. 

I turn on the debugging and I get this error  below:

QuickForm Error: the rule does not exist as a registered rule Rule '' is not registered in HTML_QuickForm::addRule()
Backtrace :

Array ( [0] => Array ( [file] => F:\mighServer\Apache\Apache24\htdocs\moodle\moodle\lib\pear\HTML\QuickForm.php [line] => 1990 [function] => PEAR_Error [class] => PEAR_Error [type] => -> [args] => Array ( [0] => the rule does not exist as a registered rule [1] => -2 [2] => 16 [3] => pear_handle_error [4] => Rule '' is not registered in HTML_QuickForm::addRule() ) ) [1] => Array ( [file] => F:\mighServer\Apache\Apache24\htdocs\moodle\moodle\lib\pear\PEAR.php [line] => 531 [function] => HTML_QuickForm_Error [class] => HTML_QuickForm_Error [object] => HTML_QuickForm_Error Object ( [error_message_prefix] => QuickForm Error: [mode] => 16 [level] => 1024 [code] => -2 [message] => the rule does not exist as a registered rule [userinfo] => Rule '' is not registered in HTML_QuickForm::addRule() [backtrace] => Array *RECURSION* [callback] => pear_handle_error ) [type] => -> [args] => Array ( [0] => -2 [1] => 16 [2] => pear_handle_error [3] => Rule '' is not registered in HTML_QuickForm::addRule() ) ) [2] => Array ( [file] => F:\mighServer\Apache\Apache24\htdocs\moodle\moodle\lib\pear\HTML\Common.php [line] => 100 [function] => raiseError [class] => PEAR [object] => PEAR Object ( [_debug] => [_default_error_mode] => [_default_error_options] => [_default_error_handler] => [_error_class] => PEAR_Error [_expected_errors] => Array 

 )

)

.....Have not changed anything on my part but let me check and see what could the error be.               

In reply to luna moon

Re: Error writing to database

by Luis de Vasconcelos -

Does that error still get triggered if you make that custom profile field optional? (Or if you delete it?)

In reply to Luis de Vasconcelos

Re: Error writing to database

by luna moon -

Hi Luis,

Good question have not tried that yet.... I'm not sure what else could it be I practically have checked every file and no luck I mean when I sign in as a student when i try to update my profile I'm able to edit and it does not give me any error.

 

Thank you for replying back!

smileLuna