The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Failed query in ft_finalize_form / row size too large: SOLUTION! - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5)
+--- Thread: Failed query in ft_finalize_form / row size too large: SOLUTION! (/showthread.php?tid=697)



Failed query in ft_finalize_form / row size too large: SOLUTION! - prometheus - May 11th, 2010

First, to Ben: You are the man. FormTools rocks my face off.

Second: after an aggravating week of trying to figure out why my 167-field form wouldn't get to the "finalize form" stage, I tried something out randomly that did the trick, based partly on a reply I saw Ben give to someone else w/ this problem and 20 Google searches.

Caveat: I'm not a skilled php (and especially SQL) programmer, but I'm learning. I felt it was my duty to at least share with the rest of you what I did to overcome this problem, because I couldn't find this answer anywhere else. I hope it helps at least a few other people get past that stage.

Here's the error message I kept seeing after the Field Types page but before it got to Finalize Form:
Failed query in ft_finalize_form, /path/to/home/page/public_html/formtools/global/code/forms.php, line 238:
CREATE TABLE ft_form_8 (
submission_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT,
PRIMARY KEY(submission_id),
col_1 VARCHAR(255),
col_2 VARCHAR(255), ... etc through col_166 VARCHAR(255)
col_167 VARCHAR(255),
submission_date DATETIME NOT NULL,
last_modified_date DATETIME NOT NULL,
ip_address VARCHAR(15),
is_finalized ENUM('yes','no') default 'yes')
TYPE=InnoDB DEFAULT CHARSET=utf8
Debug:
Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs


[end error message] = = = = = = = =

So here's what I did:
Step 1. change the default character set + collate from "utf-8" to "latin1" in this particular database I was using (I don't have any needs for international language in this instance; it may differ for you. If you expect non-latin characters, this solution will not work for you as far as I know.)
--Here are instructions if you have phpMyAdmin:
a. Log into your SQL database and go to the phpMyAdmin section
b. Click the database name in the upper-left corner at the top of the directory tree to open...it'll look like: database_name(41) or something like that.
c. Click the "operations" tab
d. Scroll down to the bottom and choose "latin1" or "latin1_general_ci", then the "go" button

Step 2. open up '/formtools/global/code/forms.php' in an editor (I use Dreamweaver) and go down to line 235. Change the line to:
TYPE=InnoDB DEFAULT CHARSET=latin1";

*do not forget the " or the ;
*also: my db type is InnoDB; yours may be different. I wouldn't change TYPE if you don't know what you're doing.

Once I did the above two steps, I was able to submit my 167-field form without having to break it up into 2-3 tables. Turns out the biggie was changing line 235 in the forms.php file. It may very well be that you might not need to do Step 1 above (changing default character set + collate), but I wanted to throw it in just in case.

I hope this helps others out. Once again, Ben: great job on FormTools!


:::prometheus


RE: Failed query in ft_finalize_form / row size too large: SOLUTION! - Ben - May 15th, 2010

Hey Prometheus,

Haha thanks! And thanks very much for the post - very clear.

The installation script should let you choose whatever charset you want, but I'm not totally sure it's possible to get that info from MySQL within PHP... (anyone?). I'll have to do a little digging on that.

But yeah, I'll be adding that in 2.0.2. Even if it can't be detected, it should at least provide the option under an "Advanced Options" section to let advanced users do this.

Also, relating to the "row size too large" problem is the database collation type itself. Form Tools uses InnoDB, but it'll be moving back to MyISAM. That'll also help resolve this sticky little problem.

Anyway, thanks very much!!! Smile

- Ben


RE: Failed query in ft_finalize_form / row size too large: SOLUTION! - Lillyorrill - Oct 25th, 2021

Failed query here is a finalized form that is almost a large solutions by the junior member in this blog post. The thread is also joined in year 2010 with the particular aspect of law essay writing service that is to make the face tool with the personalized one.