Last Game Section version: 1.3.1

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SQL Error: 1364 - Field 'sessiondata' doesn't have a default value
#1
After removing my forum to another Server, the games don't start anymore:


.jpg   Namenlos.jpg (Size: 30,37 KB / Downloads: 152)

I also get an email:

Your copy of MyBB running on Mpathie - die Meinungsfarm (https://www.mpathie-forum.de) has experienced an error. Details of the error include:
---
Type: 20
File:  (Line no. 0)
Message
SQL Error: 1364 - Field 'sessiondata' doesn't have a default value
Query:
INSERT
INTO zoukaikido_games_sessions (`uid`,`lastchange`)
VALUES (1,1492775168)

What can I do?
Reply
#2
Which MySQL version are you running and is strict-mode activated?
No support via PM


Reply
#3
(21-04-2017, 14:01)Jockl Wrote: Which MySQL version are you running and is strict-mode activated?

MyBB 1.8.11
PHP 5.6.30
MySQLi 5.6.31

Strict mode, I don't know.
Reply
#4
give it a try as follows in PHPMyAdmin but please backup your database before:

Go to your database table zoukaikido_games_sessions and run following lines as SQL-query
Code:
ALTER TABLE  `zoukaikido_games_sessions`
MODIFY  `sessiondata` TEXT NOT NULL DEFAULT  '',
MODIFY  `lastchange` BIGINT( 30 ) NOT NULL DEFAULT  '0';
No support via PM


Reply
#5
There was an error:


.jpg   Namenlos.jpg (Size: 17,96 KB / Downloads: 134)
Reply
#6
I got the Game Section working with MySQL strict mode in our forum (not sure if I covered all issues, but we've got no errors so far)
I had to make changes in 4 files: inc/plugins/games.php, inc/class_games.php, games/submit.php and tournaments.php.
There is a Diff-file with all edits attached, as well as an upgrade script to put into the forum root directory and run to modify the database columns without reinstalling the whole Games Section and losing your data.


Attached Files
.txt   diff_gamesection.txt (Size: 8,62 KB / Downloads: 128)
.php   upgrade.php (Size: 4,76 KB / Downloads: 117)
Reply
#7
Thank you for your support, doylecc Smile
No support via PM


Reply
#8
(22-04-2017, 20:06)doylecc Wrote: I got the Game Section working with MySQL strict mode in our forum (not sure if I covered all issues, but we've got no errors so far)
I had to make changes in 4 files: inc/plugins/games.php, inc/class_games.php, games/submit.php and tournaments.php.
There is a Diff-file with all edits attached, as well as an upgrade script to put into the forum root directory and run to modify the database columns without reinstalling the whole Games Section and losing your data.

Unfortunately it didn't work. Maybe it's because I renamed the prefix of the tables?
Reply
#9
No, the prefix doesn't matter. Did you apply all the edits from the diff to your files as well?
For your error with sessiondata you need the patch for class_games.php.
Reply
#10
(28-04-2017, 09:32)doylecc Wrote: Did you apply all the edits from the diff to your files as well?
Ah, I thought the upgrade.php would change the files. Can you attach the changed files? It's much easier than changing the code word by word.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)