Project

General

Profile

Actions

Anomalie #1872

closed

Cannot remove emails from emails management

Added by Frederic CROZET about 2 months ago. Updated about 1 month ago.

Status:
Fermé
Priority:
Normal
Category:
Core
Target version:
Start date:
09/22/2024
Due date:
% Done:

100%

Estimated time:
Version utilisée:

Description

Hello,

J'ai eu ce retour concernant l'impossibilité d'effacer un courriel dans la gestion des envois.

J'ai trouvé ça dans les logs :
82.165.86.18 - 2024-09-22 01:07:20 - ERROR - An error occurred on delete | Galette\Core\MailingHistory::removeEntries(): Argument #1 ($ids) must be of type array|int, string given, called in /homepages/21/d595234059/htdocs/galette/lib/Galette/Controllers/Crud/MailingsController.php on line 631

Une idée,
Merci pour aide ;)

Actions #1

Updated by Johan Cwiklinski about 2 months ago

  • Category set to Core
  • Status changed from Nouveau to In Progress
  • Assignee set to Johan Cwiklinski
  • Target version set to 1.1.4

Ce correctif devrait faire l'affaire :

diff --git a/galette/lib/Galette/Controllers/Crud/MailingsController.php b/galette/lib/Galette/Controllers/Crud/MailingsController.php
index 77f8b0512..50bfa1ceb 100644
--- a/galette/lib/Galette/Controllers/Crud/MailingsController.php
+++ b/galette/lib/Galette/Controllers/Crud/MailingsController.php
@@ -628,7 +628,7 @@ class MailingsController extends CrudController
     protected function doDelete(array $args, array $post): bool
     {
         $mailhist = new MailingHistory($this->zdb, $this->login, $this->preferences);
-        return $mailhist->removeEntries($args['id'], $this->history);
+        return $mailhist->removeEntries((int)$args['id'], $this->history);
     }
     // /CRUD - Delete
     // /CRUD

Actions #2

Updated by Johan Cwiklinski about 2 months ago

  • Status changed from In Progress to Résolu
  • % Done changed from 0 to 100
Actions #3

Updated by Frederic CROZET about 2 months ago

Johan Cwiklinski a écrit (#note-1):

Nickel !
Merci

Ce correctif devrait faire l'affaire :
[...]

Actions #4

Updated by Johan Cwiklinski about 1 month ago

  • Subject changed from Impossible d'effacer les courriels dans gestion des envois to Cannot remove emails from emails management
Actions #5

Updated by Johan Cwiklinski about 1 month ago

  • Status changed from Résolu to Fermé
Actions

Also available in: Atom PDF