Creating any task works fine. But when creating a task that repeats gives Server Error: 500
Reviewed folder permissions & PHP version, no fix yet.
Please assist. Many thanks!
Repeating / Recurring Tasks Error: 500
-
- Site Admin
- Posts: 418
- Joined: 31 Aug 2017, 15:58
Re: Repeating / Recurring Tasks Error: 500
Hello
Can you have a look in PHP logs please and report us the logs ?
Can you have a look in PHP logs please and report us the logs ?
Re: Repeating / Recurring Tasks Error: 500
This is the content of the error log. Hope you can help...
-----
[05-Jun-2025 14:23:56 Europe/Paris] PHP Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND date_debut > '2025-06-11'' at line 1 in /home/cotechsaco/public_html/do/includes/db_wrapper.inc:62
Stack trace:
#0 /home/cotechsaco/public_html/do/includes/db_wrapper.inc(62): mysqli_query()
#1 /home/cotechsaco/public_html/do/www/process/xajax_server.php(2359): db_query()
#2 /home/cotechsaco/public_html/do/includes/xajax.inc(994): submitFormPeriode()
#3 /home/cotechsaco/public_html/do/includes/xajax.inc(652): xajax->_callFunction()
#4 /home/cotechsaco/public_html/do/www/process/xajax_server.php(4862): xajax->processRequests()
#5 {main}
thrown in /home/cotechsaco/public_html/do/includes/db_wrapper.inc on line 62
-----
[05-Jun-2025 14:23:56 Europe/Paris] PHP Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND date_debut > '2025-06-11'' at line 1 in /home/cotechsaco/public_html/do/includes/db_wrapper.inc:62
Stack trace:
#0 /home/cotechsaco/public_html/do/includes/db_wrapper.inc(62): mysqli_query()
#1 /home/cotechsaco/public_html/do/www/process/xajax_server.php(2359): db_query()
#2 /home/cotechsaco/public_html/do/includes/xajax.inc(994): submitFormPeriode()
#3 /home/cotechsaco/public_html/do/includes/xajax.inc(652): xajax->_callFunction()
#4 /home/cotechsaco/public_html/do/www/process/xajax_server.php(4862): xajax->processRequests()
#5 {main}
thrown in /home/cotechsaco/public_html/do/includes/db_wrapper.inc on line 62
-
- Site Admin
- Posts: 418
- Joined: 31 Aug 2017, 15:58
Re: Repeating / Recurring Tasks Error: 500
It does not help at this moment.
Could you please try to reproduce it on our online demo (click "demo" on our website) ?
If reproduced, can you send us all details (task form and options for the repeat action) ?
As soon as we'll be able to reproduce it we'll fix it.
thanks
Could you please try to reproduce it on our online demo (click "demo" on our website) ?
If reproduced, can you send us all details (task form and options for the repeat action) ?
As soon as we'll be able to reproduce it we'll fix it.
thanks
Re: Repeating / Recurring Tasks Error: 500
Hi. thanks for your prompt assistance. I added a task on the demo site.
Task Title: test ab1
Task date: 30/06/2025
I used repeat monthly, every month until 10/11/2030
- It did not display error.
-- on return to view the saved task, the repeat shows "no repeat"
Task Title: test ab1
Task date: 30/06/2025
I used repeat monthly, every month until 10/11/2030
- It did not display error.
-- on return to view the saved task, the repeat shows "no repeat"
-
- Site Admin
- Posts: 418
- Joined: 31 Aug 2017, 15:58
Re: Repeating / Recurring Tasks Error: 500
We didn't reproduce your issue on the demo, the repeated tasks were created and showing the occurences...
Anyway we identified a specific case, it's fixed, you can download latest version again.
Thanks for reporting
Anyway we identified a specific case, it's fixed, you can download latest version again.
Thanks for reporting
Re: Repeating / Recurring Tasks Error: 500
Hi, I got the fix...
I replaced this block...
$sql = "DELETE FROM planning_periode WHERE parent_id = " . $periodeTmp->parent_id . " AND date_debut > " . val2sql($periodeTmp->date_debut);
db_query($sql);
with...
if (!empty($periodeTmp->parent_id) && !empty($periodeTmp->date_debut)) {
$sql = "DELETE FROM planning_periode WHERE parent_id = " . intval($periodeTmp->parent_id) . " AND date_debut > " . val2sql($periodeTmp->date_debut);
db_query($sql);
} else {
error_log("
Repetitive Task Skipped: Missing parent_id or date_debut. parent_id=" . $periodeTmp->parent_id . ", date_debut=" . $periodeTmp->date_debut);
}
I replaced this block...
$sql = "DELETE FROM planning_periode WHERE parent_id = " . $periodeTmp->parent_id . " AND date_debut > " . val2sql($periodeTmp->date_debut);
db_query($sql);
with...
if (!empty($periodeTmp->parent_id) && !empty($periodeTmp->date_debut)) {
$sql = "DELETE FROM planning_periode WHERE parent_id = " . intval($periodeTmp->parent_id) . " AND date_debut > " . val2sql($periodeTmp->date_debut);
db_query($sql);
} else {
error_log("
}