Duplicate entry for emails_text in the campaigns module

Hai All,

This is a repetitive issue, which is causing the campaigns to be stuck. The campaigns have been scheduled at proper time, at some point while the scheduler is running, there is a fatal error in suitecrm log, saying ‘mysql query failed: duplicate entry for emails_text’ . To resolve this issue I used to delete that entry from the database and the camapigns which are stuck in queue, are sent out to the respective email address.
What could be reason for the duplicate entries? Is there any solution to resolve this?

Please help me with the suggestions.

Thanks.

What CRM version are you using?

The campaign module has some code fixes. Check out those at the below link:

Thank you @rsp . The version I am using is Suitecrm 7.13.0.
PHP 8.0
I will check with files you have shared.

Yes, check on the GitHub.