<p>I've just upgraded to the latest version of Craft on a site that uses the Guest Entries plugin. While it was fine before hand, I'm now running into the titled issue.</p>

<p>Has anyone run into this before?</p>

<p>Here's the entry form</p>

<pre><code>&lt;form class="hard" method="post" action="" accept-charset="UTF-8"&gt;
      {{ getCsrfInput() }}
      &lt;input type="hidden" name="action" value="guestEntries/saveEntry"&gt;
      &lt;input type="hidden" name="redirect" value="{{ craft.request.url }}?registrationSuccess"&gt;
      &lt;input type="hidden" name="sectionId" value="16"&gt;
      &lt;input type="hidden" name="postDate" value="{{ now|date("Y-m-j H:i:s") }}"&gt;
      &lt;input type="hidden" name="fields[event][]" value="{{ relatedEvent.first.id }}"&gt;
      &lt;input type="hidden" name="title" value="Registration for {{ relatedEvent.first.title }} | Event ID {{ relatedEvent.first.id }} on {{ now|date("Y-m-j H:i:s") }}"&gt;
      &lt;p&gt;&lt;label for="firstName"&gt;Parent first name &lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt;
        &lt;input id="firstName" required placeholder="John" type="text" name="fields[firstName]"&gt;
      &lt;/p&gt;
      &lt;p&gt;&lt;label for="lastName"&gt;Parent last name &lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt;
        &lt;input id="lastName" required placeholder="Doe" type="text" name="fields[lastName]"&gt;
      &lt;/p&gt;
      &lt;p&gt;&lt;label for="email"&gt;Your email &lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt;
        &lt;input id="email" required placeholder="me@harvestglasgow.org" type="email" name="fields[email]"&gt;
      &lt;/p&gt;
      &lt;p&gt;&lt;label for="streetAddress"&gt;Street address &lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt;
        &lt;input id="streetAddress" required placeholder="29 Acacia Road" type="text" name="fields[streetAddress]"&gt;
      &lt;/p&gt;
      &lt;p&gt;&lt;label for="town"&gt;Town &lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt;
        &lt;input id="town" required placeholder="Glasgow" type="text" name="fields[town]"&gt;
      &lt;/p&gt;
      &lt;p&gt;&lt;label for="postcode"&gt;Postcode &lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt;
        &lt;input id="postcode" required placeholder="G72 1JP" type="text" name="fields[postcode]"&gt;
      &lt;/p&gt;
      &lt;p&gt;&lt;label for="phone"&gt;Your phone &lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt;
        &lt;input id="phone" placeholder="07766123456" type="tel" name="fields[phone]" required&gt;
      &lt;/p&gt;
      &lt;p&gt;&lt;label for="emergencyContactName"&gt;First emergency contact name &lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt;
        &lt;input id="emergencyContactName" placeholder="" type="text" name="fields[emergencyContactName]" required&gt;
      &lt;/p&gt;
      &lt;p&gt;&lt;label for="emergencyContactNumber"&gt;First emergency contact phone &lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt;
        &lt;input id="emergencyContactNumber" placeholder="07766505050" type="tel" name="fields[emergencyContactNumber]" required&gt;
      &lt;/p&gt;
      &lt;p&gt;&lt;label for="emergencyContactName2"&gt;Second emergency contact name &lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt;
        &lt;input id="emergencyContactName2" placeholder="" type="text" name="fields[emergencyContactName2]" required&gt;
      &lt;/p&gt;
      &lt;p&gt;&lt;label for="emergencyContactNumber2"&gt;Second emergency contact phone &lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt;
        &lt;input id="emergencyContactNumber2" placeholder="07766505050" type="tel" name="fields[emergencyContactNumber2]" required&gt;
      &lt;/p&gt;
      &lt;p&gt;&lt;label for="eventKids"&gt;How many kids are you registering? &lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt;
        &lt;input type="number" placeholder="1" id="eventKids" name="fields[eventKids]" required&gt;&lt;/p&gt;
      &lt;p&gt;&lt;label for="friends"&gt;Other friends attending&lt;/label&gt;
        &lt;textarea name="fields[friends]" placeholder="if your kid has any friends attending holiday club, let us know and we'll try group them together" id="friends" cols="30" rows="10"&gt;&lt;/textarea&gt;
      &lt;/p&gt;
      &lt;p&gt;&lt;label for="specialRequirements"&gt;Any special requirements?&lt;/label&gt;
        &lt;textarea name="fields[specialRequirements]" placeholder="if there's any dietary requirements or other needs that we should know about, please let us know" id="specialRequirements" cols="30" rows="10"&gt;&lt;/textarea&gt;
      &lt;/p&gt;
      &lt;p&gt;&lt;label&gt;Add your kid's information&lt;/label&gt;
      &lt;/p&gt;
      &lt;table class="table table-bordered table-hover" id="tab_logic"&gt;
        &lt;thead&gt;
          &lt;tr&gt;
            &lt;th&gt;Name&lt;/th&gt;
            &lt;th&gt;Age&lt;/th&gt;
            &lt;th&gt;DoB&lt;/th&gt;
            &lt;th&gt;School Year @ May 2017&lt;/th&gt;
          &lt;/tr&gt;
        &lt;/thead&gt;
        &lt;tbody&gt;
        &lt;tr id='addr0'&gt;
          &lt;td width="30%"&gt;
            &lt;input type="text" name="fields[kidsInformation][0][col1]" placeholder="Name"&gt;
          &lt;/td&gt;
          &lt;td width="13%"&gt;
            &lt;input type="number" min="4" max="12" name="fields[kidsInformation][0][col2]" placeholder="7"&gt;
          &lt;/td&gt;
          &lt;td width="20%"&gt;
            &lt;input type="date" name="fields[kidsInformation][0][col3]" placeholder="22/03/2008"&gt;
          &lt;/td&gt;
          &lt;td width="25%"&gt;
            &lt;input type="text" name="fields[kidsInformation][0][col4]" placeholder="P4"&gt;
          &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr id='addr1'&gt;&lt;/tr&gt;
        &lt;/tbody&gt;
      &lt;/table&gt;

      &lt;a id="add_row" class="btn btn-default pull-left  btn--small"&gt;Add Kid&lt;/a&gt;&lt;a id='delete_row' class="pull-right btn btn-default btn--small"&gt;Remove Kid&lt;/a&gt;

      &lt;p&gt;
        &lt;label for="photographPermission"&gt;I give permission for my kid to be photographed and understand that photos may be used for future Harvest Glasgow event promotions. We will also make photographs available for parents to download from our website&lt;/label&gt;

        &lt;input type="radio" name="fields[photoPermission]" value="Yes" checked&gt; Yes, I'm happy with that&lt;br&gt;
        &lt;input type="radio" name="fields[photoPermission]" value="No"&gt; No, I don't want any pictures of my kid taken
      &lt;/p&gt;

      &lt;button id="submit" type="submit" class="ready submit"&gt;Register&lt;/button&gt;
    &lt;/form&gt;
</code></pre>

CC BY-SA 3.0
2017-08-02T03:18:17.540Z
What version of Guest Entries are you on?  The (current) latest for Craft 2 is 1.5.2 (https://github.com/craftcms/guest-entries/releases/tag/1.5.2)
Brad Bell
CC BY-SA 3.0
2017-08-02T06:36:40.210Z
Sorry, should have said I upgraded Guest Entries first before Craft so the site is using 1.5.2
Steven Grant
CC BY-SA 3.0
2017-08-03T19:42:56.730Z
Hrm... I'd probably start to narrow down the form field to try and figure out which one(s) are causing the error.  My guess is there is some data not getting passed in properly.
Brad Bell
<guest-entries><plugin-guestentries><frontend-form>
CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'targetId' at row 1
# CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'targetId' at row 1

(Asked by: username_0 on 2017-08-01)

I've just upgraded to the latest version of Craft on a site that uses the Guest Entries plugin. While it was fine before hand, I'm now running into the titled issue.
Has anyone run into this before?
Here's the entry form

      {{ getCsrfInput() }}
      
      
      
      
      
      
      Parent first name *
        
      
      Parent last name *
        
      
      Your email *
        
      
      Street address *
        
      
      Town *
        
      
      Postcode *
        
      
      Your phone *
        
      
      First emergency contact name *
        
      
      First emergency contact phone *
        
      
      Second emergency contact name *
        
      
      Second emergency contact phone *
        
      
      How many kids are you registering? *
        
      Other friends attending
        
      
      Any special requirements?
        
      
      Add your kid's information
      
      
        
          
            Name
            Age
            DoB
            School Year @ May 2017
          
        
        
        
          
            
          
          
            
          
          
            
          
          
            
          
        
        
        
      

      Add KidRemove Kid

      
        I give permission for my kid to be photographed and understand that photos may be used for future Harvest Glasgow event promotions. We will also make photographs available for parents to download from our website

         Yes, I'm happy with that
         No, I don't want any pictures of my kid taken
      

      Register

**Tags:** guest-entries, plugin-guestentries, frontend-form
> **Comments:**
> **username_1**: What version of Guest Entries are you on?  The (current) latest for Craft 2 is 1.5.2 (https://github.com/craftcms/guest-entries/releases/tag/1.5.2)  
> **username_0**: Sorry, should have said I upgraded Guest Entries first before Craft so the site is using 1.5.2  
> **username_1**: Hrm... I'd probably start to narrow down the form field to try and figure out which one(s) are causing the error.  My guess is there is some data not getting passed in properly.  

---

## 0 answers

