Cannot send newsletter to email once sent
cundd opened this issue · comments
I'm not sure this is a good title for this issue. Our problem is, that we would like to send a test email to the same group again, but this doesn't seem to be possible. It doesn't even seem to be possible to send another newsletter. I think the problem has to do with the auth_code
being a unique key.
We are working on an older project with TYPO3 6.2, TemplaVoila for the general website and Fluidtemplate for the newsletter page.
Are we missing something?
I think the auth_code
is not calculated correctly. If you leave the MD5()
away the inserted auth_code
looks like '0mail@domain.tld'.
I assume the just inserted row has to be updated in a separate statement.
I guessed so... what MySQL version are you using ?
It's a MariaDB server on CentOS 7
key | value |
---|---|
innodb_version | 5.5.46-MariaDB-37.6 |
protocol_version | 10 |
version | 5.5.47-MariaDB |
version_comment | MariaDB Server |
version_compile_machine | x86_64 |
version_compile_os | Linux |
It doesn't depend on the Repetition
setting, does it?
No Repetition
is not related. It is meant to automate periodic sending, not to prevent manual re-sending.
But I am pretty sure your first observation is correct. That is MySQL/MariaDB 5.x cannot insert a field that is dependent on another, auto generated field. I use MariaDB 10.x for development so it's very possible that I missed this limitation. I'd like to find official documentation about that...
I too didn't find anything in the docs.
Is https://github.com/Ecodev/newsletter/blob/master/Classes/Tools.php#L124 the only relevant place? I could try to fix it.
Yes it's the only relevant place. I believe the insert return the uid. If that's the case it would be trivial to add an UPDATE
query right after it. If you can submit a PR, it would be very welcomed. Be careful with coding style though. It's not necessarily the same as TYPO3 CMS and it is enforced by PHP-Cs-Fixer.