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



Form Tools
Can't configure FORM EMAIL FIELD after update to 2.0.0 - 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: Can't configure FORM EMAIL FIELD after update to 2.0.0 (/showthread.php?tid=664)



Can't configure FORM EMAIL FIELD after update to 2.0.0 - mrGarvin - Apr 22nd, 2010

Hi.

I'm having an issue with the creation and editing of FORM EMAIL FIELD CONFIGURATION after I upgraded to core version 2.0.0 and API version 1.0.1

Every time I try to point out the name and emailfields I get the error "Sorry, we could not update the email fields."

At first I even got a php-error in line with: "Call to undefined function ft_update_form_email_settings() in line... page_email_settings.php"-something.

But I got rid of that by replacing the admin-files with fresh ones.
Now I get the "Sorry..." message instead.

I tried to hard code my database through PhpMyAdmin and setting the emailfields by hand. This works well in one way, they are selected in the dropdowns on the configuration page, but I can not choose the submitters as recipients of my emails when I create a new message. I can only see the administrator and the clients listed there.

Any suggestions?

//Peter Häggstrand, Sweden


RE: Can't configure FORM EMAIL FIELD after update to 2.0.0 - Ben - Apr 24th, 2010

Hey Peter! How's it going? I didn't know you were mrGarvin. The forums lend themselves to anonymity.

Regarding your problem, it actually sounds relatively serious... My hunch is that something went wrong with the upgrade: you shouldn't have had to re-write those admin files, so if something went wrong that required updating the files, we may have to do a little manual surgery on the database as well.

Since you have phpMyAdmin access, could you confirm the structure of the following tables? These were the ones that were updated in the most recent release.

(ft_)email_template_recipients
(ft_)email_templates
(ft_)form_email_fields
(ft_)forms

Here's what they're supposed to have, column-wise. (ignore the PHP - I just copied this from /install/files/sql.php):

PHP Code:
$g_sql[] = "CREATE TABLE %PREFIX%email_template_recipients (
  recipient_id mediumint(8) unsigned NOT NULL auto_increment,
  email_template_id mediumint(8) unsigned NOT NULL,
  recipient_user_type enum('admin','client','form_email_field','custom') NOT NULL,
  recipient_type enum('main','cc','bcc') NOT NULL default 'main',
  account_id mediumint(9) default NULL,
  form_email_id MEDIUMINT UNSIGNED NULL,
  custom_recipient_name varchar(200) default NULL,
  custom_recipient_email varchar(200) default NULL,
  PRIMARY KEY  (recipient_id)
) TYPE=InnoDB DEFAULT CHARSET=utf8"
;

$g_sql[] = "CREATE TABLE %PREFIX%email_templates (
  email_id mediumint(8) unsigned NOT NULL auto_increment,
  form_id mediumint(8) unsigned NOT NULL,
  email_template_name varchar(100) default NULL,
  email_status enum('enabled','disabled') NOT NULL default 'enabled',
  view_mapping_type enum('all','specific') NOT NULL default 'all',
  view_mapping_view_id mediumint(9) default NULL,
  limit_email_content_to_fields_in_view mediumint(9) default NULL,
  email_event_trigger set('on_submission','on_edit','on_delete') default NULL,
  include_on_edit_submission_page enum('no','all_views','specific_views') NOT NULL default 'no',
  subject varchar(255) default NULL,
  email_from enum('admin','client','form_email_field','custom','none') default NULL,
  email_from_account_id mediumint(8) unsigned default NULL,
  email_from_form_email_id MEDIUMINT UNSIGNED NULL,
  custom_from_name varchar(100) default NULL,
  custom_from_email varchar(100) default NULL,
  email_reply_to enum('admin','client','form_email_field','custom','none') default NULL,
  email_reply_to_account_id mediumint(8) unsigned default NULL,
  email_reply_to_form_email_id MEDIUMINT UNSIGNED NULL,
  custom_reply_to_name varchar(100) default NULL,
  custom_reply_to_email varchar(100) default NULL,
  html_template mediumtext,
  text_template mediumtext,
  PRIMARY KEY (email_id)
) TYPE=InnoDB DEFAULT CHARSET=utf8"
;

$g_sql[] = "CREATE TABLE %PREFIX%form_email_fields (
  form_email_id MEDIUMINT unsigned NOT NULL auto_increment,
  form_id MEDIUMINT UNSIGNED NOT NULL,
  email_field VARCHAR( 255 ) NOT NULL,
  first_name_field VARCHAR( 255 ) NULL,
  last_name_field VARCHAR( 255 ) NULL,
  PRIMARY KEY (form_email_id)
) TYPE=InnoDB DEFAULT CHARSET=utf8"
;

$g_sql[] = "CREATE TABLE %PREFIX%form_fields (
  field_id mediumint(8) unsigned NOT NULL auto_increment,
  form_id mediumint(8) unsigned NOT NULL default '0',
  field_name varchar(255) NOT NULL default '',
  field_test_value mediumtext,
  field_size enum('tiny','small','medium','large','very_large') default 'medium',
  field_type enum('select','multi-select','radio-buttons','checkboxes','file','textbox','textarea','system','wysiwyg','date','image','password') NOT NULL default 'textbox',
  data_type enum('string','number','date') NOT NULL default 'string',
  field_title varchar(100) default NULL,
  col_name varchar(100) default NULL,
  list_order smallint(5) unsigned default NULL,
  include_on_redirect enum('yes','no') NOT NULL default 'no',
  `field_group_id` mediumint(9) default NULL,
  PRIMARY KEY  (field_id)
) TYPE=InnoDB DEFAULT CHARSET=utf8"


- Ben


RE: Can't configure FORM EMAIL FIELD after update to 2.0.0 - mrGarvin - Apr 26th, 2010

Hi Ben!
Yes, long time no "see"... Doing fine here in Sweden. Have been busy trying to learn the universitys (http://lnu.se) new publishing system and have now gone back to FormTools since our system SUCKS at handling forms... As the rebel I am, I have gone outside our system and placed my forms on a different server with your beautiful system on it :-)
I hope everything's alright with you aswell and that you're able to continue your work with FormTools for YEARS to come :-)

Over to the problem...
YES!!! That's it! I somehow missed out on the fact that I had to update the tables as well. The old table had a reference to a field called "user" instead of the new "Form_email_field" and also lacked the rows with from_form_email_id and reply_to_form_email_id.
And I didn't have the table "ft_form_email_fields"

Works like a charm now. Many thanks!
//Peter


RE: Can't configure FORM EMAIL FIELD after update to 2.0.0 - Ben - Apr 27th, 2010

Nice! Glad that fixed it - and good to hear you're using it on that site. Hope it doesn't ruffle too many feathers. Smile

Yeah, things are fine here. Busy, but good! I'm pretty excited about the Form Builder component that I'm working on. It's really remarkably powerful; I hope it'll open up Form Tools to a lot more people.

Anyway, glad it's working okay now. Speak soon!

Ben