Krytic / MyBBWiki

http://krytic.github.io/MyBBWiki
10 stars 4 forks source link

Can't install plugin #8

Closed Kryniowesegryderiusz closed 8 years ago

Kryniowesegryderiusz commented 8 years ago

Hi, when i try to install & activate the plugin i have problem with MySQL:

Error SQL:
1366 - Incorrect integer value: '' for column 'tid' at row 1

Request:
INSERT INTO mybb_templates (`tid`,`title`,`template`,`sid`,`version`,`dateline`) VALUES ('','wiki_article_contents','<div class=\"wiki_contents\">\r\n {$contents_element}\r\n</div>','-2','2.8',1465488045)

Earlier i had problem with creating the table. It said that it couldn't set the default value '' for lastauthor and notepad, so I created this without it.

Kryniowesegryderiusz commented 8 years ago

My problem seems similar to https://github.com/Krytic/MyBBWiki/issues/1 but i have the 5.7.12 version on ubuntu

Krytic commented 8 years ago

Check that in inc/plugins/wiki.php, the line "tid" => NULL, is present.

Kryniowesegryderiusz commented 8 years ago

I removed all "tid" => NULL and "sid" => NULL in wiki.php and install.php and now it is working

Krytic commented 8 years ago

I find it odd that MySQL/PHP is treating NULL as an empty string, though. I'll do some digging, because this issue will probably crop up again.