Title: Error adding signup record
Last modified: August 20, 2016

---

# Error adding signup record

 *  [Brian in Baltimore](https://wordpress.org/support/users/brian-in-baltimore/)
 * (@brian-in-baltimore)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/error-adding-signup-record/)
 * First off, excellent plug-in. Thank you for making this available!
 * Quick question: I have created a sign-up and everything seems to be working, 
   except that during testing I get a “Error adding signup record. Please try again”.
 * However, the plug-in successfully sends out the email, and logs the name/info
   for the filled out form, and checks of the sign-up as being filled on the front
   sign-up sheet.
 * Any info or help would be appreciated. Again, thanks for your work on this plug-
   in!
 * Brian
 * [http://wordpress.org/extend/plugins/sign-up-sheets/](http://wordpress.org/extend/plugins/sign-up-sheets/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [dlsstudios](https://wordpress.org/support/users/dlsstudios/)
 * (@dlsstudios)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/error-adding-signup-record/#post-3370019)
 * Brian,
 * Thank you for reporting this. I will have to dig in deeper to see what the specific
   issue is, but as a quick fix to get your set up working, you can comment out 
   the following line in the `sign-up-sheets.php` (should be at or near line 166)
   by added the double forward slash before the line. As soon as I get a chance 
   to research further I will update this post.
 * **BEFORE**
    `$return .= '<p class="dls-sus error">'.__('Error adding signup record.
   Please try again.').'</p>';`
 * **AFTER**
    `//$return .= '<p class="dls-sus error">'.__('Error adding signup 
   record. Please try again.').'</p>';`
 *  [hermesnl](https://wordpress.org/support/users/hermesnl/)
 * (@hermesnl)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/error-adding-signup-record/#post-3370119)
 * Hi…I am getting the same error. I have added the // and I no longer get the error.
   I am also not getting an confirmation email after I sign up. Is commenting out
   this line and not receiving an email related?
 *  Thread Starter [Brian in Baltimore](https://wordpress.org/support/users/brian-in-baltimore/)
 * (@brian-in-baltimore)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/error-adding-signup-record/#post-3370127)
 * What I did to work around this is to just change the ‘Error adding signup record.
   Please try again’ to a positive ‘Thank you for signing up’ message, in addition
   to changing the img assigned to the “dls-sus error” class in the style sheet.
 *  [hermesnl](https://wordpress.org/support/users/hermesnl/)
 * (@hermesnl)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/error-adding-signup-record/#post-3370132)
 * Thanks Brian. Do the email notifications work for you when somebody signs up?
 *  [robsdigiphos](https://wordpress.org/support/users/robsdigiphos/)
 * (@robsdigiphos)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/error-adding-signup-record/#post-3370145)
 * Commenting out the lines mentioned above did not fix the issue for me. However,
   I did notice that this issue is only related to IE. When using chrome, it seems
   to work. IE won’t even add the record to the list.
 *  [dlsstudios](https://wordpress.org/support/users/dlsstudios/)
 * (@dlsstudios)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/error-adding-signup-record/#post-3370170)
 * I haven’t been able to recreate this issue yet, but if you wouldn’t mind, please
   make these temporary modifications which will change the error message you are
   getting to include more details. Then let me know the new error message you receive.
   If you prefer to send this information privately you can contact us through [http://www.dlssoftwarestudios.com/contact-us/](http://www.dlssoftwarestudios.com/contact-us/)
 * Replace the line I had you comment out earlier in this topic in the file **sign-
   up-sheets.php** with…
 * `$return .= '<p class="dls-sus error">'.__('Error adding signup record. Please
   try again.').' ERROR DETAIL: '.print_r($this->data->err, true).'</p>';`
 * Then, in **data.php** below the line at the top that says `public $tables = array();`
   add…
 * `public $err = array();`
 * Then replace the entire **add_signup()** method with the following code
 *     ```
       public function add_signup($fields, $task_id)
           {
               $clean_fields = $this->clean_array($fields, 'signup_');
               $clean_fields = array_intersect_key($clean_fields, $this->tables['signup']['allowed_fields']);
               $clean_fields['task_id'] = $task_id;
   
               // Check if signup spots are filled
               $task = $this->get_task($task_id);
               $signups = $this->get_signups($task_id);
               if (count($signups) >= $task->qty) {
                   $this->err['add_signup'][] = 'All spots are filled.';//debug
                   return false;
               }
   
               $result = $this->wpdb->insert('asdf', $clean_fields);
               if ($result === false) $this->err['add_signup'][] = 'Error when inserting signup... (START MYSQL ERROR) '.print_r(mysql_error(), true).' (START MYSQL ERROR)';//debug
   
               return $result;
           }
       ```
   
 *  [dlsstudios](https://wordpress.org/support/users/dlsstudios/)
 * (@dlsstudios)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/error-adding-signup-record/#post-3370172)
 * We have just posted an update to the plugin. One of the new features is to be
   able to turn on detailed error reporting through the admin `Settings > Sign-up
   Sheets` menu. Instead of making the code changes above, please feel free to upgrade
   and turn on the detailed error messages which may provide some clue as to what
   is going on.
 *  [hermesnl](https://wordpress.org/support/users/hermesnl/)
 * (@hermesnl)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/error-adding-signup-record/#post-3370175)
 * I now get the following error when signing up:
 * Error adding signup. All spots are filled.
 * This happens when there are still available spots left. I turned on detailed 
   error messages, but the message did not change.
 *  [dlsstudios](https://wordpress.org/support/users/dlsstudios/)
 * (@dlsstudios)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/error-adding-signup-record/#post-3370176)
 * [@hermesnl](https://wordpress.org/support/users/hermesnl/), can you try changing
   line #247 of **data.php** (starting with “throw new”) to the code below…
 * `throw new SUS_Data_Exception('Error adding signup. All spots are filled.'. ((
   $this->detailed_errors === true) ? ' Current Signups: '.count($signups).', Total
   Spots:'.$task->qty : ''));`
 * Then try running your test again with detailed errors on and let me know the 
   error message you get. You should now get a little more data.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Error adding signup record’ is closed to new replies.

 * ![](https://ps.w.org/sign-up-sheets/assets/icon.svg?rev=1117093)
 * [Sign-up Sheets](https://wordpress.org/plugins/sign-up-sheets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sign-up-sheets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sign-up-sheets/)
 * [Active Topics](https://wordpress.org/support/plugin/sign-up-sheets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sign-up-sheets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sign-up-sheets/reviews/)

 * 9 replies
 * 4 participants
 * Last reply from: [dlsstudios](https://wordpress.org/support/users/dlsstudios/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/error-adding-signup-record/#post-3370176)
 * Status: not resolved