Fixed: "*Email Results to set Address(es)" won't save email in Form Builder

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
Pieter
New Member
New Member
Posts: 4
Joined: Fri Feb 01, 2008 9:26 pm

Fixed: "*Email Results to set Address(es)" won't save email in Form Builder

Post by Pieter »

Hello all,

No question this time, just a FYI post on a situation I encountered while using the Form Builder. I run a local IIS5.1 (WinXP) / PHP 5 installation with MySQL 4.1, and CMSMS 1.2.3. I downloaded and installed the current Form Builder build 0.4.4 and set it up, along with CMSMailer. CMSMailer was able to send out emails through SMTP without any problem.

I ran into the following issue. When I added or updated certain parameters ("From name" for email, "From address" for email or Destination Email Address) in either an "*Email Results to set Address(es)" or "*Email Results Based on Pulldown" field, the address would appear to be stored, but as soon as I clicked the "Save" or "Save and Continue Editing" button on the main form screen, it would say there were no email addresses set: To: [unspecified] and "Email Template not yet set!". Trying to send the form on the website itself would result in a "Sorry! There was an error handling your form submission." message.

After having turned on debug mode in config.php I noticed that INSERT statements to the cms_module_fb_field_opt failed with a "duplicate key" error. According to the listed SQL statement the module was trying to insert a new record with option_id 0.

Turned out that for some odd reason, the cms_module_fb_field_opt_seq table was created during the module's installation, but no initial record was placed in this table. Consequently the Form Builder module, when asking for a new ID, kept receiving 0's. The fix was simple enough: I added a new record to the cms_module_fb_field_opt_seq table with a value of "1".

I'm posting this in case someone else happens to run into a similar situation and, unlike me, can find the solution to this situation through Google :)

Cheers,
Pieter
Post Reply

Return to “Developers Discussion”