Post reply

The message has the following error or errors that must be corrected before continuing:
Warning: this topic has not been posted in for at least 365 days.
Unless you're sure you want to reply, please consider starting a new topic.
Attachments: (Clear attachments)
Restrictions: maximum total size 97.89 MB, maximum individual size 97.89 MB
Uncheck the attachments you no longer want attached
Click or drag files here to attach them.
Other options
Verification:
Please leave this box empty:
True or False: The letter 'C' is in the middle row?:
True or False: The yellow square has 4 on it?:
True or False: The square with 3 on it is green?:
Shortcuts: ALT+S post or ALT+P preview

Topic summary

Posted by Dave
 - 03.11.2022, 07:55
When I woke up this morning I remembered this was an old problem.

It's because of the title var which is set to 255.

Go to your phpMyAdmin, select your database at the top of the left column.

In the right hand panel look for the table 'smf_quiz_question', see attachments

Now click on 'Structure'

In the next window on line 3 you should see '3   question_text' at the end of that line click on 'Change'.

Now change the value 255 to 512 and then click on 'Save'

You should now have no problems importing quizzes with long question titles.

Regards

Dave

Posted by Dave
 - 02.11.2022, 23:56
Hi Shades

I see from the dowload page there are 44 quizzes in that pack. As I don't have access to my PC at the moment I cant remember if the are 2 or more xml files in the zip.

If there are only 2 it might be because the quiz doesn't like to import more that 20 quizzes in a pack, although I think one set does have more and did work ok on my site.

It also might be one of the questions exceeds the character limit for a question itself. There is a way to increase the limit but without looking at the code I cant remember where to change it.

I will have a look tomorrow morning and reply again

Dave
Posted by Shades
 - 02.11.2022, 23:20
SMF 2.1.2

Hey Dave,

I got the quiz installed and working but having trouble importing the quizzes from Film & Theatre. Specifically Pack 6b & Pack 6c. I get the following error:

QuoteError
Type of error
Database
Error message
Database Error: Data too long for column 'question_text' at row 1
File
/home/******/public_html/******/Sources/Quiz/Db.php
Line
2419
URL of page causing the error
https://******.com/?action=admin;area=quiz;sa=quizimporter

Backtrace information
#0: smf_db_error()
Called from /home/******/public_html/******/Sources/Subs-Db-mysql.php on line 494
#1: smf_db_query()
Called from /home/******/public_html/******/Sources/Subs-Db-mysql.php on line 802
#2: smf_db_insert()
Called from /home/******/public_html/******/Sources/Quiz/Db.php on line 2419
#3: ImportQuizQuestion()
Called from /home/******/public_html/******/Sources/Quiz/Admin.php on line 2343
#4: import_quiz()
Called from /home/******/public_html/******/Sources/Quiz/Admin.php on line 2658
#5: GetQuizImportData()
Called from /home/******/public_html/******/Sources/Quiz/Admin.php on line 198
#6: SMFQuizAdmin()
Called from /home/******/public_html/******/Sources/Admin.php on line 509
#7: AdminMain()
Called from /home/******/public_html/******/index.php on line 192

Thanks,
Shades