Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dublicate Hash entry in tl_newsletter_blacklist #21

Closed
ghost opened this issue May 17, 2018 · 2 comments
Closed

Dublicate Hash entry in tl_newsletter_blacklist #21

ghost opened this issue May 17, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@ghost
Copy link

ghost commented May 17, 2018

Issue by @Z3NOX
May 2nd, 2018, 09:53 GMT

Hi,
ich sehe ein Problem beim Austragen der Mails aus dem Newsletter.

  • Angenommen ich habe zwei Newsletter eingerichtet (ID: 3, 5)
  • ich trage eine Mail in Newsletter1 ein (PID 3)
  • ich trage mich aus Newsletter1 wieder aus -> es wir ein Eintrag in tl_newsletter_blacklist angelegt, der mit der PID auf Newsletter1 verweist.
  • nun trage ich die selbe Mail in Newsletter2 (PID 5) ein.
  • will ich diese jetzt wieder austragen gibt es einen Fehler weil die Hash-Spalte in tl_newsletter_blacklist unique ist, obwohl eine andere PID mit übergeben wird

Folgender Fehler steht dazu im LOG:

[2018-05-02 09:36:11] app.CRITICAL: An exception occurred. {"exception":"[object] (Doctrine\\DBAL\\Exception\\UniqueConstraintViolationException(code: 0): An exception occurred while executing 'INSERT INTO tl_newsletter_blacklist (pid, hash) VALUES ('5', '8b526a063b60d4e6ea507e3c6af30d28')':\n\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '8b526a063b60d4e6ea507e3c6af30d28' for key 'hash' at /var/www/vhosts/host.de/cms/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:70, Doctrine\\DBAL\\Driver\\PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '8b526a063b60d4e6ea507e3c6af30d28' for key 'hash' at /var/www/vhosts/host.de/cms/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:106, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '8b526a063b60d4e6ea507e3c6af30d28' for key 'hash' at /var/www/vhosts/host.de/cms/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:104)"} []

Ich habe noch nicht probiert, was passiert, wenn ich im Menü von "Newsletter kündigen" einen Haken setze, der das Verteilermenü ausblenden soll. Dann sind ja standardmäßig alle Verteiler ausgewählt. Wenn die Mail aber schon für einen der Verteiler geblacklisted ist, man sich aber aus dem zweiten austragen will kommt es natürlich auch zu einem Fehler. Da müsste man sich auch Gedanken machen, wie damit verfahren wird. Vielleicht löst sich das Problem aber auch, wenn obiger Bug behoben ist.

@ghost
Copy link
Author

ghost commented May 17, 2018

Comment by @de-es
May 15th, 2018, 08:24 GMT

Kann ich bestätigen (4.4.18). Ändern des Index auf hash von unique auf key oder entfernen löst das Problem auf den ersten Blick.

@leofeyer leofeyer added the bug label May 17, 2018
@leofeyer leofeyer added this to the 4.4.19 milestone May 17, 2018
@leofeyer leofeyer self-assigned this Jun 15, 2018
@leofeyer
Copy link
Member

Behoben in d14bafd.

@leofeyer leofeyer modified the milestones: 4.4.19, 4.4 May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant