How do I define [student_name], [corrections] and [concert_date_time] in the above script?"> Chronoforms v7 and php8 compatibility - Forums

Forums

Chronoforms v7 and php8 compatibility

tenspiderfingers 28 May, 2023
I am running Chornoforms 7.0.10 in Joomla 4.0. After php was updated to V.8, forms using database encoded in JSON received frontend errors "Undefined constant" and "HY000, 1366, Incorrect integer value: '' for column 'aid' at row 1" from 2 different forms" after submission.

I tested by downgrading php to 7.4 and everything worked fine.

All submissions were recorded correctly in the php database but failed to read and send. Is there something I need to do to correct the error?

Thanks for any help and pointers as I have no clue in programing but to follow the instructions from the forum.

----
Made some testings and found that the error was caused by a php script in the send email

<?php
$detailsArray = $this->get("read_data_30.Model30.details");

$color = "style='background-color: #e8e6e6;padding:0.5em 0.5em 0.5em 1em; border-color: white;border-style:solid;border-width:0.1em 0.1em 1em 0.1em; width:75%;'";
$colorBlue = "style='background-color: #cefafe;padding:0.5em 0.5em 0.5em 1em; border: 0.1em solid white;font-weight:bold;'";
$colorBlue2 = "style='background-color: #cefafe;padding:0.5em 0.5em 0.5em 1em; border-color: white; border-style:solid;border-width:0.1em 0.1em 1em 0.1em;'";
for ($i = 1;  $i <= count($detailsArray); $i++)
echo "<tr>
<td ".$colorBlue." >" .$detailsArray["$i"][student_name]. "</td>
<td ".$color." rowspan='2'>" .$detailsArray["$i"][corrections]. "</td></tr><tr>
<td ".$colorBlue2.">" .$detailsArray["$i"][concert_date_time]. "</td>
</tr>";
?>


How do I define [student_name], [corrections] and [concert_date_time] in the above script?
Max_admin 06 Aug, 2023
I think your code should be
$detailsArray[$i]["concert_date_time"]

but this is not related to the error you have which is related to the db table default value of the aid column.

I recommend that you also try v8
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
You need to login to be able to post a reply.