I recreated the Article list demo delete action in my own form and got the below debug. I then tried the delete data action in the Article list demo and that also failed. I think this may be a bug?
Array ( [chronoform] => currscholapp_committee [gpage] => DeleteApp [aid] => 574 [Itemid] => 491 [option] => com_chronoforms7 [view] => form )
Array ( [delete_data_569] => Array ( [result] => Data deletion failed! [log] => Array ( ) [var] => false ) )
Maybe it's not allowed to delete data entries from outside? Does anyone know how to solve this?
what did you pass in the Delete Data action "Conditions" ?
I have the same problem with that part of the demo.
It looks like the WHERE clause is not defined, aka 'conditions' (thanks Max).
In the Delete Data action 'Delete Article', I added the 'Where Conditions' option in Advanced Settings and added the following where condition:
Table field name: Article.id
Operator: =
Value: {data:id}
The {data:id} refers to the URL parameter '&id=123 (article id)
Don't know if there is a better way, or if it is an omission in the demo; I let Max be the judge of that ;-)
It looks like the WHERE clause is not defined, aka 'conditions' (thanks Max).
In the Delete Data action 'Delete Article', I added the 'Where Conditions' option in Advanced Settings and added the following where condition:
Table field name: Article.id
Operator: =
Value: {data:id}
The {data:id} refers to the URL parameter '&id=123 (article id)
Don't know if there is a better way, or if it is an omission in the demo; I let Max be the judge of that ;-)
This is a known issue in J4, the article id is not captured in CF, you will need to add a PHP action before the delete:
then in the Delete Action you should use {var:id} instead of {data:id}
$this->set("id", JFactory::getApplication()->input->getInt('id'));
then in the Delete Action you should use {var:id} instead of {data:id}
You need to login to be able to post a reply.