i downloaded the fresh cvs (today) and add the (3 or 4) latest patch and try to test.
when i create a new question and answers, everything seems ok.. but at the end of the process, i'm redirected to an existing node (not the newly created !)
when i go to content administration and try to edit the newly multichoice created, it looks ok, but not exactly.
so i search my database and found that new nodes are being created from beginning (1).. of course my attemps quiz_question_answer.nid are 1, 2, 3, ... and same thing in node_revision ... but blank pages and other errors are because those nid already exist in node table (he he, i'm not using a fresh db for the test but a copy of production data) watchdoc confirms that with critical error entries saying :
mysql_query() [http://www.mysql.com/doc]: Duplicate entry '5' for key 1 à la ligne 102 du fichier /var/www/htdocs/mysites/includes/database.mysql.inc.
:( i don't know how and when this happen and why nobody found it
Comments
Comment #1
seanbfuller commentedHey gilcot,
For both of these issues can you do me a favor and corfirm that your database tables match up to the new .install format? Especially the quiz_open, quiz_close, start_time and end_time columns. I'd also suggest removing all quiz data (delete all nodes and drop all quiz tables). I was having strange issues at one point and dropping my tables and using the devel module to re-install them fixed everything for me.
Also check to make sure all the patches went in fine and none of them conflicted (you would probably have a quiz.module.rej file if they did).
I'll reinstall the module from scratch myself and try to follow up on these errors.
Comment #2
gilcot commentedyou're right about the db schema :
quiz.quiz_open and quiz.quiz_close where quiz.open and quiz.close here : that solve a part of the date problem here http://drupal.org/node/90853 (correct dates retrieved now, but cannot save/edit yet)
quiz_result.released was still datetime instead of int
about patches rejected (it's against the latest cvs, 23/10/2006 - 05:46, dowloaded from http://drupal.org/project/quiz ) :
quiz_finished_fix.patch was already included
quiz_no_questions.patch was also included
quiz_session.patch was build in too
quiz_markup.patch is also inside !
i think the trick is done in the function multichoice_insert($node)
so, why is $node->nid wrong ? i'm perplexe.
Comment #3
gilcot commentedi wrote and try to answer the question some minutes ago, i faced the same bug when adding a conventional node (a story page)..
the problem was in my database : i'm working on a copy of production data (it give like an in-condition-testing) ...but with another prefix ! then ma sequence table was holding the bad values (sequences names are prefixed -why ?- and then Drupal has just created another sequence -with a different prefix- instead of using the existing one) :D i feel so stupid with that (it's a separate db, i should keep the same prefix)
sorry for the noise :|