For running J!5.1 you must https://fabrikar.com/forums/index.php?wiki/update-from-github/ or include the new file manually https://fabrikar.com/forums/index.php?threads/joomla-5-1-and-fabrik-cannot-find-files-error.54473/post-285151 See also Announcements
Please see our announcement here.
The debug_with_labels.php email template contains an "exit;" in the last code line (I assume it should not), so it doesn't send an email but displays on the screen.debug_with_labels.php email templates
<?php
$busses = $this->data['join'][3]['passo_12_repeat___bus'];
$drivers = $this->data['join'][3]['passo_12_repeat___driver_name'];
$length1 = count($busses);
for ($i = 0; $i < $length1; $i++) :
$db =& JFactory::getDBO();
$qdriver = strip_tags($drivers[$i]);
$query = "SELECT `driver_natid` FROM `drivers` WHERE `driver_name` = '$qdriver'";
$db->setQuery($query);
$driver_natid = $db->loadResult();
$db =& JFactory::getDBO();
$qdriver = strip_tags($drivers[$i]);
$query = "SELECT `driver_code` FROM `drivers` WHERE `driver_name` = '$qdriver'";
$db->setQuery($query);
$driver_code = $db->loadResult();
$db =& JFactory::getDBO();
$qbus_code = strip_tags($busses[$i]);
$query = "SELECT `bus_code` FROM `busses` WHERE `plate_no` = '$qbus_code'";
$db->setQuery($query);
$bus_code = $db->loadResult();
?>
<tr>
<td><?php echo strip_tags($busses[$i]);?></td>
<td><?php echo strip_tags($bus_code);?></td>
<td><?php echo strip_tags($drivers[$i]);?></td>
<td><?php echo strip_tags($driver_natid);?></td>
<td><?php echo strip_tags($driver_code);?></td>
<td> </td>
<td> </td>
</tr>
</tbody>
<?php
endfor;
?>