Page 25 of 32
Re: [ALPHA 2] Ultimate Quiz MOD v2.1.1 Progress
Posted: Sat Feb 19, 2011 7:32 am
by Clenzowen
Hello,
always the same mistakes ...
I hope to repair it, because I had just installed the mod quizzes, and members appreciate.
I just made the changes requested and The first error message at the top of the page that appears is :
Code: Select all
Warning: Cannot modify header information - headers already sent by (output started at /home/forumsfa/public_html/personnel/gratuits/arcades-et-jeux-35/quiz_installer.php:1) in /home/forumsfa/public_html/personnel/gratuits/arcades-et-jeux-35/includes/functions.php on line 2678
And the second message
Code: Select all
Erreur générale
SQL ERROR [ mysql4 ]
Table 'phpbb3_quiz_categories' already exists [1050]
SQL
CREATE TABLE phpbb3_quiz_categories ( quiz_category_id INT(5) NOT NULL AUTO_INCREMENT PRIMARY KEY , quiz_category_name INT(5) NOT NULL )
BACKTRACE
FILE: includes/db/mysql.php
LINE: 175
CALL: dbal->sql_error()
FILE: quiz_installer.php
LINE: 48
CALL: dbal_mysql->sql_query()
Re: [ALPHA 2] Ultimate Quiz MOD v2.1.1 Progress
Posted: Sat Feb 19, 2011 7:56 am
by battye
What happens if you try to access quiz.php?
That "Erreur générale" is appearing on quiz_installer.php. Once you have run that file (and made the change at
http://forums.cricketmx.com/viewtopic.p ... 82#p105682) you can delete quiz_installer.php.
Re: [ALPHA 2] Ultimate Quiz MOD v2.1.1 Progress
Posted: Sat Feb 19, 2011 8:06 am
by Clenzowen
when i click on quiz to play I have this error message
Code: Select all
Erreur générale
SQL ERROR [ mysql4 ]
Unknown column 's.quiz_statistic_id' in 'field list' [1054]
SQL
SELECT COUNT(s.quiz_statistic_id) AS quiz_count FROM phpbb3_quiz_statistics s, phpbb3_quiz_questions q WHERE s.quiz_user = 2 AND s.quiz_question_id = q.question_id AND q.question_quiz = 5 LIMIT 1
BACKTRACE
FILE: includes/db/mysql.php
LINE: 175
CALL: dbal->sql_error()
FILE: includes/db/mysql.php
LINE: 222
CALL: dbal_mysql->sql_query()
FILE: includes/db/dbal.php
LINE: 170
CALL: dbal_mysql->_sql_query_limit()
FILE: includes/quiz/quiz_statistics.php
LINE: 191
CALL: dbal->sql_query_limit()
FILE: quiz.php
LINE: 553
CALL: quiz_statistics->has_user_played_quiz()
when I want to start installing the update by typing in the browser
Code: Select all
General Error
SQL ERROR [mysql4]
Table 'phpbb3_quiz_categories' already exists [1050]
SQL
CREATE TABLE phpbb3_quiz_categories (quiz_category_id INT (5) NOT NULL PRIMARY KEY AUTO_INCREMENT, quiz_category_name INT (5) NOT NULL)
BackTrace
FILE: includes / db / mysql.php
LINE: 175
CALL: DBAL-> SQL_ERROR ()
FILE: quiz_installer.php
LINE: 48
CALL: dbal_mysql-> sql_query ()
Re: [ALPHA 2] Ultimate Quiz MOD v2.1.1 Progress
Posted: Sat Feb 19, 2011 10:25 am
by battye
I've never seen the "Unknown column 's.quiz_statistic_id' in 'field list' [1054]" error before, I don't even recall seeing it during development.
I think the best thing might be to backup phpbb_quiz and phpbb_quiz_questions and phpbb_quiz_statistics - then drop the 4 quiz tables in phpMyAdmin - run quiz_installer.php and re-insert the backed up data.
I think you have missed a step during the upgrade but I am not sure what.
Re: [ALPHA 2] Ultimate Quiz MOD v2.1.1 Progress
Posted: Sat Feb 19, 2011 11:06 am
by Clenzowen
Sorry I double checked everything it still does not ...
And I still have a general error:
Code: Select all
SQL ERROR [ mysql4 ]
Unknown column 's.quiz_statistic_id' in 'field list' [1054]
SQL
SELECT COUNT(s.quiz_statistic_id) AS quiz_count FROM phpbb3_quiz_statistics s, phpbb3_quiz_questions q WHERE s.quiz_user = 2 AND s.quiz_question_id = q.question_id AND q.question_quiz = 5 LIMIT 1
BACKTRACE
FILE: includes/db/mysql.php
LINE: 175
CALL: dbal->sql_error()
FILE: includes/db/mysql.php
LINE: 222
CALL: dbal_mysql->sql_query()
FILE: includes/db/dbal.php
LINE: 170
CALL: dbal_mysql->_sql_query_limit()
FILE: includes/quiz/quiz_statistics.php
LINE: 191
CALL: dbal->sql_query_limit()
FILE: quiz.php
LINE: 553
CALL: quiz_statistics->has_user_played_quiz()
Re: [ALPHA 2] Ultimate Quiz MOD v2.1.1 Progress
Posted: Sat Feb 19, 2011 12:08 pm
by battye
In phpMyAdmin can you browse the phpbb3_quiz_statistics table? There should definitely be a quiz_statistic_id (underlined, it is the primary key).
Could you also check the phpbb3_config table and ensure that all of the quiz settings (they all start with
qc_ are present). I don't think it relates to this error, but something is going wrong and I can't narrow down what it is yet
Are you able to provide a link to your forum with a test account so I can look? Thanks
Re: [ALPHA 2] Ultimate Quiz MOD v2.1.1 Progress
Posted: Sat Feb 19, 2011 1:04 pm
by Clenzowen
yes, quiz_statistic_id is underlined
i send u a pm for attest count
Re: [ALPHA 2] Ultimate Quiz MOD v2.1.1 Progress
Posted: Sat Feb 19, 2011 1:55 pm
by battye
Thanks Clenzowen, I had a look and fixed it for you.
Creating table phpbb3_quiz...
Creating table phpbb3_quiz_questions...
Creating table phpbb3_quiz_statistics...
Creating table phpbb3_quiz_categories...
Creating table phpbb3_config...
Installation is finished with no errors.
For support, please visit CricketMX.com or phpBB MOD support topic.
I see what the problem is now, I think you had UQM v2.0.0 already installed - so when you overwrote the files it was still looking at the old database tables from v2.0.0
I didn't delete the existing tables as I wasn't sure if you still wanted them, so I renamed them to phpbb3_quiz_OLD, phpbb3_quiz_questions_OLD, phpbb3_quiz_categories_OLD and phpbb3_quiz_statistics_OLD.
I tested the quiz page, it appears with no errors
So all you need to do now is add a category in the ACP and start adding questions
Let me know if it works
Re: [ALPHA 1] Ultimate Quiz MOD v2.1.0 Progress
Posted: Sat Feb 19, 2011 3:02 pm
by Abera
battye wrote:
Abera, the colour is the same used as in polls.
Thank you sir. I don't know which one it was, but I got it changed.
Color bars
Re: [ALPHA 2] Ultimate Quiz MOD v2.1.1 Progress
Posted: Sat Feb 19, 2011 3:35 pm
by Clenzowen
it's ok thank you
Would you like me to translate files in french please?
Re: [ALPHA 2] Ultimate Quiz MOD v2.1.1 Progress
Posted: Sat Feb 19, 2011 3:37 pm
by battye
Yes, a French translation would be great - thank you
Re: [ALPHA 2] Ultimate Quiz MOD v2.1.1 Progress
Posted: Sat Feb 19, 2011 3:41 pm
by Clenzowen
ok I'll do translations, tomorrow, I would have more time.
Re: [ALPHA 2] Ultimate Quiz MOD v2.1.1 Progress
Posted: Sat Feb 19, 2011 11:58 pm
by plasmino
battye, I was on 2.1.0 ... send me the files for the upgrade?
Re: [ALPHA 2] Ultimate Quiz MOD v2.1.1 Progress
Posted: Sun Feb 20, 2011 2:29 am
by Livirathon
hi~battye
Quiz mod can't support Multil language.
if i use english name is work!
else
Re: [ALPHA 2] Ultimate Quiz MOD v2.1.1 Progress
Posted: Sun Feb 20, 2011 7:27 am
by battye
Ahhh, the foreign characters always get me
The fix mainly consists of adding a "true" parameter at the end of the request_var function.
CATEGORIES
Code: Select all
--------------OPEN includes/acp/acp_quiz.php--------------------
-----------FIND----------------
// Now do the actual update, fix up the category name first.
$category = utf8_normalize_nfc( $db->sql_escape(request_var('category_name', '')) );
-------------REPLACE WITH-------------
// Now do the actual update, fix up the category name first.
$category = $db->sql_escape( utf8_normalize_nfc(request_var('category_name', '', true)) );
---------------FIND---------------
if( !check_form_key('uqm_category') )
{
trigger_error($user->lang['ACP_UQM_QUIZ_FORM_INVALID'] . adm_back_link(append_sid("{$phpbb_admin_path}index.$phpEx?i=quiz&t=add_category")));
}
$category = utf8_normalize_nfc( $db->sql_escape(request_var('category_name', '')) );
---------REPLACE WITH------------
if( !check_form_key('uqm_category') )
{
trigger_error($user->lang['ACP_UQM_QUIZ_FORM_INVALID'] . adm_back_link(append_sid("{$phpbb_admin_path}index.$phpEx?i=quiz&t=add_category")));
}
$category = $db->sql_escape( utf8_normalize_nfc(request_var('category_name', '', true)) );
EDIT: here are the fixes for adding/playing quizzes
Code: Select all
---OPEN quiz.php---
---FIND---
$check_correct = $quiz_configuration->check_correct_checked($current_questions); // see if the user has left any empty
$quiz_name = request_var('quiz_name', '');
---REPLACE WITH---
$check_correct = $quiz_configuration->check_correct_checked($current_questions); // see if the user has left any empty
$quiz_name = request_var('quiz_name', '', true);
----OPEN includes/quiz/quiz_question.php----
---FIND---
for($i = 0; $i < request_var('question_number', 0); $i++)
{
$question_name = request_var('question_name_' . $i, '');
$answers_name = request_var('answers_' . $i, '');
$multiples = explode("\n", $answers_name);
$correct = request_var('answer_' . $i, '');
---REPLACE WITH---
for($i = 0; $i < request_var('question_number', 0); $i++)
{
$question_name = request_var('question_name_' . $i, '', true);
$answers_name = request_var('answers_' . $i, '', true);
$multiples = explode("\n", $answers_name);
$correct = request_var('answer_' . $i, '', true);
Then run these SQL queries to convert the database tables to utf8_bin (by default they are collated in latin or something, which is another thing that will be rectified with UMIL...)
Code: Select all
----DATABASE----
ALTER DATABASE `phpbb_quiz` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
ALTER DATABASE `phpbb_quiz_categories` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
ALTER DATABASE `phpbb_quiz_questions` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
ALTER DATABASE `phpbb_quiz_statistics` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
Edit 2: screenshots of foreign characters working + the quiz play once setting below. I also found a bug whereby if the "show answers" config setting is disabled, then no quiz statistics are stored - that's fixed now