Saving main form with sub form fails

The sub form setup:

Subform Title: Rondvaarten Master Form Key: id Take FORM from Module: Rondvaarten Sub Form Database: tours Sub Form Relation Key: itinerary_id

The error:

ErrorException in Controller.php line 609:

Undefined index: itinerary_id

  1. in Controller.php line 609 2.at HandleExceptions->handleError('8', 'Undefined index: itinerary_id', '/var/www/maasboot/app/Http/Controllers/Controller.php', '609', array('model' => object(tour), 'request' => array('_token' => 'aUptiVEZYRtHEcTSAe9vFchm7XeAn5Gc9I34xj7Y', 'id' => '1', 'name_nl' => 'Tocht 1', 'name_de' => 'Route 1', 'description_nl' => 'Tijdens een combinatie tocht met een huifkar bekijkt u het mooie Maasduinengebied van twee verschillende kanten. Halverwege wisselt u van vervoermiddel. Via twee verschillende routes, over water en over land, krijgt u de mooiste stukjes van het Maasduinen', 'description_de' => '', 'duration_minutes' => '120', 'departure_location' => 'Grotestraat 11, Well', 'latitude' => '51.567474', 'longtitude' => '6.060446', 'adult_price' => '11.00', 'child_price' => '7.00', 'max_passengers' => '120', 'bulk_itinerary_id' => array(''), 'bulk_departure_datetime' => array(''), 'counter' => array(''), 'enable-masterdetail' => 'true', 'apply' => '', 'return' => ''), 'detail' => array('title' => 'Rondvaarten', 'master' => 'itinerary', 'master_key' => 'id', 'module' => 'tour', 'table' => 'tours', 'key' => 'itinerary_id'), 'id' => '1')) in Controller.php line 609 3.at Controller->detailviewsave(object(tour), array('_token' => 'aUptiVEZYRtHEcTSAe9vFchm7XeAn5Gc9I34xj7Y', 'id' => '1', 'name_nl' => 'Tocht 1', 'name_de' => 'Route 1', 'description_nl' => 'Tijdens een combinatie tocht met een huifkar bekijkt u het mooie Maasduinengebied van twee verschillende kanten. Halverwege wisselt u van vervoermiddel. Via twee verschillende routes, over water en over land, krijgt u de mooiste stukjes van het Maasduinen', 'description_de' => '', 'duration_minutes' => '120', 'departure_location' => 'Grotestraat 11, Well', 'latitude' => '51.567474', 'longtitude' => '6.060446', 'adult_price' => '11.00', 'child_price' => '7.00', 'max_passengers' => '120', 'bulk_itinerary_id' => array(''), 'bulk_departure_datetime' => array(''), 'counter' => array(''), 'enable-masterdetail' => 'true', 'apply' => '', 'return' => ''), array('title' => 'Rondvaarten', 'master' => 'itinerary', 'master_key' => 'id', 'module' => 'tour', 'table' => 'tours', 'key' => 'itinerary_id'), '1') in ItineraryController.php line 157
yuyinitos
yuyinitos
  • 1 year ago

Did you add a key to your table on itinerary_ID? There has to be also a key on that one, if its not primary.

Have you solved this issue? Have the same problem.