Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.9.2
-
Fix Version/s: 2.0
-
Component/s: Wiki (2.x)
-
Labels:None
-
Environment:Hide(1) Windows 2000, Apache 2.2.8, PHP 5.2.5, Postgresql 8.2.10, Moodle 1.9+ build 20081002 (attempted upgrade of nWiki)
(2) Windows 2000, Apache 2.2.8, PHP 5.2.5, Postgresql 8.2.10, Moodle 1.9+ build 20080506 (test of game module)
(3) Windows 2000, Apache 2.2.8, PHP 5.2.5, Postgresql 8.3.4, Moodle 1.9+ build 20081007 (test of game module)Show(1) Windows 2000, Apache 2.2.8, PHP 5.2.5, Postgresql 8.2.10, Moodle 1.9+ build 20081002 (attempted upgrade of nWiki) (2) Windows 2000, Apache 2.2.8, PHP 5.2.5, Postgresql 8.2.10, Moodle 1.9+ build 20080506 (test of game module) (3) Windows 2000, Apache 2.2.8, PHP 5.2.5, Postgresql 8.3.4, Moodle 1.9+ build 20081007 (test of game module)
-
Database:PostgreSQL
-
Affected Branches:MOODLE_19_STABLE
-
Fixed Branches:MOODLE_20_STABLE
Description
On the 2nd of October I attempted to upgrade moodle and nWiki the upgrade of Moodle I think succeeded but the upgrade of nWiki got stuck in a loop so that Moodle could no longer be accessed. The upgrade failed due to errors that I think point to incompatibilities between dmllib.php and the syntax required for postgresql. The error messages are included below. The environment was that of (1) listed above.
I have then set up a new virtual server to test for issues with a couple of non-standard modules and postgresql 8.3.4, duplicating my actions on both the new server with environment (3) and the original server with environment (2). In testing the hangman game in the game module errors resulted whether the game was set to use a quiz or a glossary. I believe the errors again point to syntax issues in dmllib.php with respect to postgresql. The error messages are included below.
Regards
Johnathan
************************************************************
Errors when upgrading nWiki on 2nd October 2008
***********************************************************
(postgres7): UPDATE mdl_wiki SET evaluation_alter_column_tmp = CAST(CAST(evaluation AS TEXT) AS INTEGER)
--------------------------------------------------------------------------------
-1: ERROR: invalid input syntax for integer: "noeval"
ADOConnection._Execute(UPDATE mdl_wiki SET evaluation_alter_column_tmp = CAST(CAST(evaluation AS TEXT) AS INTEGER), false) % line 891, file: adodb.inc.php
ADOConnection.Execute(UPDATE mdl_wiki SET evaluation_alter_column_tmp = CAST(CAST(evaluation AS TEXT) AS INTEGER)) % line 89, file: dmllib.php
execute_sql(UPDATE mdl_wiki SET evaluation_alter_column_tmp = CAST(CAST(evaluation AS TEXT) AS INTEGER), true) % line 2277, file: dmllib.php
execute_sql_arr(Array[6], true, true) % line 1127, file: ddllib.php
change_field_type(Object:XMLDBTable, Object:XMLDBField) % line 749, file: upgrade.php
--------------------------------------------------------------------------------
(postgres7): ALTER TABLE mdl_wiki ALTER COLUMN evaluation SET NOT NULL
--------------------------------------------------------------------------------
-1: ERROR: column "evaluation" contains null values
ADOConnection._Execute(ALTER TABLE mdl_wiki ALTER COLUMN evaluation SET NOT NULL, false) % line 891, file: adodb.inc.php
ADOConnection.Execute(ALTER TABLE mdl_wiki ALTER COLUMN evaluation SET NOT NULL) % line 89, file: dmllib.php
execute_sql(ALTER TABLE mdl_wiki ALTER COLUMN evaluation SET NOT NULL, true) % line 2277, file: dmllib.php
execute_sql_arr(Array[6], true, true) % line 1127, file: ddllib.php
change_field_type(Object:XMLDBTable, Object:XMLDBField) % line 749, file: upgrade.php
Upgrading wiki from 2008040101 to 2008080401 FAILED!
(postgres7): ALTER TABLE mdl_wiki ALTER COLUMN evaluation SET NOT NULL
--------------------------------------------------------------------------------
-1: ERROR: column "evaluation" contains null values
ADOConnection._Execute(ALTER TABLE mdl_wiki ALTER COLUMN evaluation SET NOT NULL, false) % line 891, file: adodb.inc.php
ADOConnection.Execute(ALTER TABLE mdl_wiki ALTER COLUMN evaluation SET NOT NULL) % line 89, file: dmllib.php
execute_sql(ALTER TABLE mdl_wiki ALTER COLUMN evaluation SET NOT NULL, true) % line 2277, file: dmllib.php
execute_sql_arr(Array[6], true, true) % line 1127, file: ddllib.php
change_field_type(Object:XMLDBTable, Object:XMLDBField) % line 749, file: upgrade.php
Upgrading wiki from 2008040101 to 2008080401 FAILED!
***********************************************************************************************************
Errors when using the game module hangman game with either a glossary or a quiz (8th Oct)
***********************************************************************************************************
ERROR: LIMIT #,# syntax is not supported HINT: Use separate LIMIT and OFFSET clauses.
SELECT mdl_question.id,mdl_question.id FROM mdl_question,mdl_quiz_question_instances WHERE qtype='shortanswer' AND quiz='1' AND mdl_quiz_question_instances.question=mdl_question.id LIMIT 0,1
- line 686 of lib\dmllib.php: call to debugging()
- line 966 of lib\dmllib.php: call to get_recordset_sql()
- line 206 of mod\game\locallib.php: call to get_records_sql()
- line 152 of mod\game\locallib.php: call to game_question_selectrandom()
- line 99 of mod\game\locallib.php: call to game_question_shortanswer_quiz()
- line 30 of mod\game\hangman\play.php: call to game_question_shortanswer()
- line 110 of mod\game\attempt.php: call to game_hangman_continue()
- line 81 of mod\game\attempt.php: call to game_create()
ERROR: LIMIT #,# syntax is not supported HINT: Use separate LIMIT and OFFSET clauses.
SELECT mdl_question.id,mdl_question.id FROM mdl_question,mdl_quiz_question_instances WHERE qtype='shortanswer' AND quiz='1' AND mdl_quiz_question_instances.question=mdl_question.id LIMIT 0,1
- line 686 of lib\dmllib.php: call to debugging()
- line 966 of lib\dmllib.php: call to get_recordset_sql()
- line 206 of mod\game\locallib.php: call to get_records_sql()
- line 152 of mod\game\locallib.php: call to game_question_selectrandom()
- line 99 of mod\game\locallib.php: call to game_question_shortanswer_quiz()
- line 30 of mod\game\hangman\play.php: call to game_question_shortanswer()
- line 110 of mod\game\attempt.php: call to game_hangman_continue()
- line 81 of mod\game\attempt.php: call to game_create()
ERROR: LIMIT #,# syntax is not supported HINT: Use separate LIMIT and OFFSET clauses.
SELECT mdl_question.id,mdl_question.id FROM mdl_question,mdl_quiz_question_instances WHERE qtype='shortanswer' AND quiz='1' AND mdl_quiz_question_instances.question=mdl_question.id LIMIT 0,1
- line 686 of lib\dmllib.php: call to debugging()
- line 966 of lib\dmllib.php: call to get_recordset_sql()
- line 206 of mod\game\locallib.php: call to get_records_sql()
- line 152 of mod\game\locallib.php: call to game_question_selectrandom()
- line 99 of mod\game\locallib.php: call to game_question_shortanswer_quiz()
- line 30 of mod\game\hangman\play.php: call to game_question_shortanswer()
- line 110 of mod\game\attempt.php: call to game_hangman_continue()
- line 81 of mod\game\attempt.php: call to game_create()
ERROR: LIMIT #,# syntax is not supported HINT: Use separate LIMIT and OFFSET clauses.
SELECT mdl_question.id,mdl_question.id FROM mdl_question,mdl_quiz_question_instances WHERE qtype='shortanswer' AND quiz='1' AND mdl_quiz_question_instances.question=mdl_question.id LIMIT 0,1
- line 686 of lib\dmllib.php: call to debugging()
- line 966 of lib\dmllib.php: call to get_recordset_sql()
- line 206 of mod\game\locallib.php: call to get_records_sql()
- line 152 of mod\game\locallib.php: call to game_question_selectrandom()
- line 99 of mod\game\locallib.php: call to game_question_shortanswer_quiz()
- line 30 of mod\game\hangman\play.php: call to game_question_shortanswer()
- line 110 of mod\game\attempt.php: call to game_hangman_continue()
- line 81 of mod\game\attempt.php: call to game_create()
ERROR: LIMIT #,# syntax is not supported HINT: Use separate LIMIT and OFFSET clauses.
SELECT mdl_question.id,mdl_question.id FROM mdl_question,mdl_quiz_question_instances WHERE qtype='shortanswer' AND quiz='1' AND mdl_quiz_question_instances.question=mdl_question.id LIMIT 0,1
- line 686 of lib\dmllib.php: call to debugging()
- line 966 of lib\dmllib.php: call to get_recordset_sql()
- line 206 of mod\game\locallib.php: call to get_records_sql()
- line 152 of mod\game\locallib.php: call to game_question_selectrandom()
- line 99 of mod\game\locallib.php: call to game_question_shortanswer_quiz()
- line 30 of mod\game\hangman\play.php: call to game_question_shortanswer()
- line 110 of mod\game\attempt.php: call to game_hangman_continue()
- line 81 of mod\game\attempt.php: call to game_create()
ERROR: LIMIT #,# syntax is not supported HINT: Use separate LIMIT and OFFSET clauses.
SELECT mdl_question.id,mdl_question.id FROM mdl_question,mdl_quiz_question_instances WHERE qtype='shortanswer' AND quiz='1' AND mdl_quiz_question_instances.question=mdl_question.id LIMIT 0,1
- line 686 of lib\dmllib.php: call to debugging()
- line 966 of lib\dmllib.php: call to get_recordset_sql()
- line 206 of mod\game\locallib.php: call to get_records_sql()
- line 152 of mod\game\locallib.php: call to game_question_selectrandom()
- line 99 of mod\game\locallib.php: call to game_question_shortanswer_quiz()
- line 30 of mod\game\hangman\play.php: call to game_question_shortanswer()
- line 110 of mod\game\attempt.php: call to game_hangman_continue()
- line 81 of mod\game\attempt.php: call to game_create()
ERROR: LIMIT #,# syntax is not supported HINT: Use separate LIMIT and OFFSET clauses.
SELECT mdl_question.id,mdl_question.id FROM mdl_question,mdl_quiz_question_instances WHERE qtype='shortanswer' AND quiz='1' AND mdl_quiz_question_instances.question=mdl_question.id LIMIT 0,1
- line 686 of lib\dmllib.php: call to debugging()
- line 966 of lib\dmllib.php: call to get_recordset_sql()
- line 206 of mod\game\locallib.php: call to get_records_sql()
- line 152 of mod\game\locallib.php: call to game_question_selectrandom()
- line 99 of mod\game\locallib.php: call to game_question_shortanswer_quiz()
- line 30 of mod\game\hangman\play.php: call to game_question_shortanswer()
- line 110 of mod\game\attempt.php: call to game_hangman_continue()
- line 81 of mod\game\attempt.php: call to game_create()
ERROR: LIMIT #,# syntax is not supported HINT: Use separate LIMIT and OFFSET clauses.
SELECT mdl_question.id,mdl_question.id FROM mdl_question,mdl_quiz_question_instances WHERE qtype='shortanswer' AND quiz='1' AND mdl_quiz_question_instances.question=mdl_question.id LIMIT 0,1
- line 686 of lib\dmllib.php: call to debugging()
- line 966 of lib\dmllib.php: call to get_recordset_sql()
- line 206 of mod\game\locallib.php: call to get_records_sql()
- line 152 of mod\game\locallib.php: call to game_question_selectrandom()
- line 99 of mod\game\locallib.php: call to game_question_shortanswer_quiz()
- line 30 of mod\game\hangman\play.php: call to game_question_shortanswer()
- line 110 of mod\game\attempt.php: call to game_hangman_continue()
- line 81 of mod\game\attempt.php: call to game_create()
ERROR: LIMIT #,# syntax is not supported HINT: Use separate LIMIT and OFFSET clauses.
SELECT mdl_question.id,mdl_question.id FROM mdl_question,mdl_quiz_question_instances WHERE qtype='shortanswer' AND quiz='1' AND mdl_quiz_question_instances.question=mdl_question.id LIMIT 0,1
- line 686 of lib\dmllib.php: call to debugging()
- line 966 of lib\dmllib.php: call to get_recordset_sql()
- line 206 of mod\game\locallib.php: call to get_records_sql()
- line 152 of mod\game\locallib.php: call to game_question_selectrandom()
- line 99 of mod\game\locallib.php: call to game_question_shortanswer_quiz()
- line 30 of mod\game\hangman\play.php: call to game_question_shortanswer()
- line 110 of mod\game\attempt.php: call to game_hangman_continue()
- line 81 of mod\game\attempt.php: call to game_create()
ERROR: LIMIT #,# syntax is not supported HINT: Use separate LIMIT and OFFSET clauses.
SELECT mdl_question.id,mdl_question.id FROM mdl_question,mdl_quiz_question_instances WHERE qtype='shortanswer' AND quiz='1' AND mdl_quiz_question_instances.question=mdl_question.id LIMIT 0,1
- line 686 of lib\dmllib.php: call to debugging()
- line 966 of lib\dmllib.php: call to get_recordset_sql()
- line 206 of mod\game\locallib.php: call to get_records_sql()
- line 152 of mod\game\locallib.php: call to game_question_selectrandom()
- line 99 of mod\game\locallib.php: call to game_question_shortanswer_quiz()
- line 30 of mod\game\hangman\play.php: call to game_question_shortanswer()
- line 110 of mod\game\attempt.php: call to game_hangman_continue()
- line 81 of mod\game\attempt.php: call to game_create()
No words found
Stack trace:
- line 1651 of lib\deprecatedlib.php: call to debugging()
- line 129 of mod\game\hangman\play.php: call to error()
- line 110 of mod\game\attempt.php: call to game_hangman_continue()
- line 81 of mod\game\attempt.php: call to game_create()
I fixed the problem to module game