Hey guys,
Wappler 5.8.2
Win 10
php 7.4.33
MySQL
I used a form repeat to insert values to the Main Table and its subtable (following this @Teodor’s tutorial: Using App Connect Form Repeater with Update Record Forms
Of course I also used the known upsert method by checking the main table’s id and proceed with a database update action if id is submitted otherwise a database insert action.
My Insert action (id not submitted) works fine.
But when I try to update a main/subtable record, when I submit my form I get this error:
{
"code": 0,
"file": "C:\\xampp\\htdocs\\datastore_test\\dmxConnectLib\\modules\\dbupdater.php",
"line": 288,
"message": "Undefined property: stdClass::$returning",
"trace": "#0 C:\\xampp\\htdocs\\datastore_test\\dmxConnectLib\\modules\\dbupdater.php(288): exception_error_handler(8, 'Undefined prope...', 'C:\\\\xampp\\\\htdocs...', 288, Array)\n#1 C:\\xampp\\htdocs\\datastore_test\\dmxConnectLib\\lib\\App.php(204): modules\\dbupdater->update(Object(stdClass), 'updateVariation...', Array)\n#2 C:\\xampp\\htdocs\\datastore_test\\dmxConnectLib\\lib\\App.php(176): lib\\App->execSteps(Object(stdClass))\n#3 C:\\xampp\\htdocs\\datastore_test\\dmxConnectLib\\lib\\App.php(144): lib\\App->execSteps(Array)\n#4 C:\\xampp\\htdocs\\datastore_test\\dmxConnectLib\\modules\\core.php(100): lib\\App->exec(Object(stdClass), true)\n#5 C:\\xampp\\htdocs\\datastore_test\\dmxConnectLib\\lib\\App.php(204): modules\\core->condition(Object(stdClass), '', NULL)\n#6 C:\\xampp\\htdocs\\datastore_test\\dmxConnectLib\\lib\\App.php(144): lib\\App->execSteps(Object(stdClass))\n#7 C:\\xampp\\htdocs\\datastore_test\\dmxConnectLib\\lib\\App.php(133): lib\\App->exec(Object(stdClass), false)\n#8 C:\\xampp\\htdocs\\datastore_test\\dmxConnectLib\\lib\\App.php(111): lib\\App->exec(Object(stdClass))\n#9 C:\\xampp\\htdocs\\datastore_test\\dmxConnect\\api\\variations\\variation_add.php(8): lib\\App->define(Object(stdClass))\n#10 {main}"
}
After a couple of test I realized that the problem is only when updating the subtable entries.
**There is no 500 error in the following 2 cases:
- I delete the formrepeat field (array) from the update database step and just update the main’s table data
- I remove all the subtable records in my form and then click submit. It submits normally without an error 500 (but not updating / deleting the subtable records that I deleted in my form)
While trying to figure this out I noticed that there are 4 updates in my wappler’s project:
- App
- Text
- Date
- Arraylist
App and Arraylist is these 2 that I have updated with new files that patrick has gave me in order to solve Arraylist errors a few days ago. Sort array bug (SC)
So, I clicked the update button and after that I tried to run the same server action that had problem when patrick solved it and I get again the same error:
{
"code": 0,
"file": "C:\\xampp\\htdocs\\datastore_test\\dmxConnectLib\\modules\\arraylist.php",
"line": 15,
"message": "Creation of dynamic property lib\\App::$arrays is deprecated",
"trace": "#0 C:\\xampp\\htdocs\\datastore_test\\dmxConnectLib\\modules\\arraylist.php(15): exception_error_handler(8192, 'Creation of dyn...', 'C:\\\\xampp\\\\htdocs...', 15)\n#1 C:\\xampp\\htdocs\\datastore_test\\dmxConnectLib\\lib\\App.php(204): modules\\arraylist->create(Object(stdClass), 'list', Array)\n#2 C:\\xampp\\htdocs\\datastore_test\\dmxConnectLib\\lib\\App.php(176): lib\\App->execSteps(Object(stdClass))\n#3 C:\\xampp\\htdocs\\datastore_test\\dmxConnectLib\\lib\\App.php(144): lib\\App->execSteps(Array)\n#4 C:\\xampp\\htdocs\\datastore_test\\dmxConnectLib\\lib\\App.php(133): lib\\App->exec(Object(stdClass), false)\n#5 C:\\xampp\\htdocs\\datastore_test\\dmxConnectLib\\lib\\App.php(111): lib\\App->exec(Object(stdClass))\n#6 C:\\xampp\\htdocs\\datastore_test\\dmxConnect\\api\\users\\registration\\usr_login_copy.php(7): lib\\App->define(Object(stdClass))\n#7 {main}"
}
Your help would be much appreciated…
Thanks in advance