Mautic Community Forums

Delete all contacts

It seems that the option to delete all contacts isn’t available.

I imported some 40.000 and its quite tricky to delete all of them by hand.

Thank you.

It seems that the option to delete all contacts isn’t available.
I imported some 40.000 and its quite tricky to delete all of them by hand.
Thank you.

I’m having a problem with deleting multiple contacts as well.

I’m using Mautic 1.4.1. In order to do a batch delete it looks like you’re supposed to check multiple boxes (one for each row you want to delete), or the checkbox at the top to delete all, then click the orange trash can icon at the top right of the leads list. However, the batch delete is not working. Individual deletes work (by clicking the down arrow at the beginning of each row and clicking the delete icon in the drop down list) but not the batch deletes. If I look in the logs I see this:

[2016-06-07 18:08:44] mautic.WARNING: PHP Warning: Invalid argument supplied for foreach() - in file /var/www/html/marketing/app/bundles/LeadBundle/Controller/LeadController.php - at line 1071 [] []

Upon further debugging, it looks like this row is the culprit:
$ids = json_decode($this->request->query->get(‘ids’, ‘{}’));

It’s resulting in $ids being null. If I change it so I can log before and after the json_decode:
$ids = $this->request->query->get(‘ids’, ‘{}’));
my_log_function('ids: ’ . print_r($ids, true));
$ids = json_decode($ids);
my_log_function('decoded ids: ’ . print_r($ids, true));

I get this:
[07-Jun-2016 18:04:48 UTC] ids: [“12”, “19”]
[07-Jun-2016 18:04:48 UTC] decoded ids:

I’m guessing there’s something wrong with the way you’re passing the IDs from the javascript to the ajax. Can you confirm that this is a bug? Also, can you advise as to how you’d like stuff like this reported in the future?

Best,
Dave

Actually the same thing happens when deleting all form results as well (for example, on /s/forms/results/2, check all, delete). I assume it happens for all the executeBatchActions. Please advise.