Jump to the post that solved this thread.
Solved: 3 Years, 4 Months, 4 Weeks ago Activation = Internal SQL Error
#1
Solved: 3 Years, 4 Months, 4 Weeks ago
On activation of an Tagging Plugin! (1.3.4) (Created by flash.tato, I believe this was a 1.6 plugin modified for 1.8 compatibility, the files been in my computer so long I really can't remember) an internal SQL error occurs.

I've used this plugin on 7 other forums so far all running 1.8.7 --> up. Works perfectly and beautifully on each. EXCEPT THIS ONE.

I'm helping someone out with creating a skin/theme for their site and happened to be helping in this area too for this plugin.

Error message:
Quote:MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1101 - BLOB/TEXT column 'tags' can't have a default value
Query:
ALTER TABLE mybb_oct2017_posts ADD tags TEXT NOT NULL DEFAULT ''

Plugin file attached below as well as a screen shot. Any help would be appreciated.


http://crying-for-the-moon.digibase.ca/forums/index.php


Attached Files Thumbnail(s)
   

.php   tagging.php (Size: 18 KB / Downloads: 55)
> SELECT finger FROM hand WHERE id='3'
Reply
#2
Solved: 3 Years, 4 Months, 4 Weeks ago
you can try removing DEFAULT '' in line 25 of the plugin file
$db->query("ALTER TABLE  `" . $db->table_prefix . "posts` ADD  `tags` TEXT NOT NULL DEFAULT  ''");

Note: php files should be saved with utf-8 encoding without Byte Order Mark.
in general, we use editor like Notepad++ or file editor at web host panel
Reply
#3
Solved: 3 Years, 4 Months, 4 Weeks ago
I use Code Writer (I believe it is similar to Notepad++ but something downloadable from the windows store).

It is now throwing this error:
Quote:SQL Error:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '''' at line 1
Query:
ALTER TABLE mybb_oct2017_posts ADD tags TEXT NOT NULL ''
> SELECT finger FROM hand WHERE id='3'
Reply
#4
Solved: 3 Years, 4 Months, 4 Weeks ago
can you try below for that code line & check
$db->query("ALTER TABLE  `" . $db->table_prefix . "posts` ADD  `tags` TEXT NOT NULL");
Reply
#5
Solved: 3 Years, 4 Months, 4 Weeks ago
I'm not quite sure if I understand what you mean by try below that line and check so here is another file of what it is at this moment after I removed the word "DEFAULT" on line 25.


Attached Files
.php   tagging.php (Size: 17.99 KB / Downloads: 39)
> SELECT finger FROM hand WHERE id='3'
Reply
#6
Solved: 3 Years, 4 Months, 4 Weeks ago
well, single quotes ('') should be also removed after the word DEFAULT

remaining line (without DEFAULT '')
$db->query("ALTER TABLE  `" . $db->table_prefix . "posts` ADD  `tags` TEXT NOT NULL"); 
Reply
#7
Solved: 3 Years, 4 Months, 4 Weeks ago
New error:

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1366 - Incorrect integer value: 'NULL' for column 'gid' at row 1
Query:
INSERT INTO mybb_oct2017_settinggroups (gid,title,name,description,disporder,isdefault) VALUES ('NULL','Tagging Plugin! Settings','tagging','Manage every single aspect of the Tagging Plugin!','4','0')
> SELECT finger FROM hand WHERE id='3'
Reply
#8
Solved: 3 Years, 4 Months, 4 Weeks ago
in the plugin file, can you replace NULL with 0 [zero] in below line, save the file & try again ..
 "gid"            => "NULL",
Reply
#9
Solved: 3 Years, 4 Months, 4 Weeks ago
That worked! Thank you for the help! Smile
> SELECT finger FROM hand WHERE id='3'
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)