The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.28 (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.28 (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.28 (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.28 (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.28 (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.28 (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.28 (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.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Error after renaming columns - 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: Error after renaming columns (/showthread.php?tid=539)



Error after renaming columns - filch - Feb 26th, 2010

Hi Ben,
thought I would start a new thread on this one as the other is almost solved and this was a different issue.

I might have made a mistake here by renaming the columns (col1 ... col2 etc) in the DB section of formtools. I wanted the columns to have more recognizable names. However now, when I try to view the submissions, I get the following error:

Code:
Failed query in ft_search_submissions:

Debug:

Unknown column 'col_1' in 'order clause'

Seems to be something in the sort order code, which would make sense. Can you direct me to this code so I can perhaps replace the old column names with the new ones? Or, will this screw up my other forms?

Dave


RE: Error after renaming columns - filch - Feb 26th, 2010

Ben,

I just rebuilt the form as I needed it running. However, still would like to know why this broke and/or how to change the column names without breaking the form.

Dave


RE: Error after renaming columns - Ben - Mar 7th, 2010

Hey Dave,

VERY interesting...! I've encountered this myself a couple of times when I was manually editing the database table fields, but never just from updating the fields from within Form Tools.

By the sounds of it, what happened was that when you updated the database column fields on the Edit Form -> Database tab, the query to update the database table column names ran properly but the DB column field update query DIDN'T. So you then had a discrepancy which FT couldn't reconcile.

I looked at the code and it doesn't have any sort of rollback code in place to ensure the DB table col names and database records are always in synch.

This is bad. I'll log this as a bug and fix it in an upcoming build.

Thanks Dave.

- Ben


RE: Error after renaming columns - maxcreigs - Mar 10th, 2010

Are you sure you have Alter privileges on that classic table?
If not, do you have "ALTER ANY TABLE" privileges?
If that doesn't work, maybe you need the CREATE ANY INDEX privilege.
In addition, if you are not the owner of the table, you need the DROP ANY TABLE privilege


RE: Error after renaming columns - filch - Mar 10th, 2010

Thanks for your input. I own the server and as such, it is totally within my control and in most cases, including this one, I set myself up with all priviledges, including ALTER.

Thanks

Dave

(Mar 10th, 2010, 1:19 AM)maxcreigs Wrote: Are you sure you have Alter privileges on that classic table?
If not, do you have "ALTER ANY TABLE" privileges?
If that doesn't work, maybe you need the CREATE ANY INDEX privilege.
In addition, if you are not the owner of the table, you need the DROP ANY TABLE privilege



RE: Error after renaming columns - Ben - Mar 11th, 2010

(Mar 10th, 2010, 1:19 AM)maxcreigs Wrote: Are you sure you have Alter privileges on that classic table?

Good call, though. This was a likely cause.