I'm on OpenCart 3.0.3.8 with maintenance version 3.0.x.x that supports PHP 8.2.
When I send an email to my newsletters subscribers it starts off and shows
20 of 430
50 of 430
80 of 430
ect
then it starts going past 430 and climbs into the thousands and I have to hit the back button to stop it.
it reached to 5520 of 430. (See Screen shot attached) I only have 1,932 customers in the database.
What could be causing this issue?
When I send an email to my newsletters subscribers it starts off and shows
20 of 430
50 of 430
80 of 430
ect
then it starts going past 430 and climbs into the thousands and I have to hit the back button to stop it.
it reached to 5520 of 430. (See Screen shot attached) I only have 1,932 customers in the database.
What could be causing this issue?
Attachments
Newsletter.JPG (40.73 KiB) Viewed 2640 times
Last edited by KandC on Mon Oct 16, 2023 3:29 am, edited 1 time in total.
I think the issue is it's multiplying the reported number of emails sent. Think this line should be changed.
https://github.com/opencart/opencart/bl ... 3C5-L203C5
To.
You might want to temporarily comment out $mail->send(); in the same file to, to avoid actually sending the emails when testing.
https://github.com/opencart/opencart/bl ... 3C5-L203C5
To.
Code: Select all
$json['success'] = sprintf($this->language->get('text_sent'), $start + 10, $email_total);
Then the correct way to report your "version" is that you are on "3.0.x.x_Maintenance".
I wouldn't really send mass emails from inside OpenCart, you should use something like MailChimp instead to avoid all sorts of problems.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
GET over your self. You don't have to keep correcting me. JUST STOP ITpaulfeakins wrote: ↑Mon Oct 02, 2023 7:11 pmThen the correct way to report your "version" is that you are on "3.0.x.x_Maintenance".
I wouldn't really send mass emails from inside OpenCart, you should use something like MailChimp instead to avoid all sorts of problems.
Stop posting incorrect information then.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
I will not respond to you ever again. Your help is not needed. Thank you.
There's certainly no need for that attitude when I'm advising on the correct way to report your OpenCart version. Please refer to the forum rules.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
I changed the coding line you suggested and also commented out the send mail line. It still is going past the number of newsletter subscribers.ADD Creative wrote: ↑Mon Oct 02, 2023 6:37 pmI think the issue is it's multiplying the reported number of emails sent. Think this line should be changed.
https://github.com/opencart/opencart/bl ... 3C5-L203C5
To.You might want to temporarily comment out $mail->send(); in the same file to, to avoid actually sending the emails when testing.Code: Select all
$json['success'] = sprintf($this->language->get('text_sent'), $start + 10, $email_total);
When it reaches 430 - it should stop the process. The process just continues on sending
440 out of 430,
450 out of 430,
460 out of 430
Have there been any other changes to the code, maybe by an extension?
To test you could make the line.
There is a line 194 before that has "$end = $start + 10;" and then there is line 206 with a test for the end "if ($end < $email_total) {". So if $end is greater or equal to $email_total, which are both being shown, no next URL should be returned. You could check this it your web browser's developer console network tab.
To test you could make the line.
Code: Select all
$json['success'] = sprintf($this->language->get('text_sent'), $end, $email_total);
We don't have any marketing modules or email integrations that we installed. Just the default opencart software.ADD Creative wrote: ↑Mon Oct 09, 2023 4:24 pmHave there been any other changes to the code, maybe by an extension?
To test you could make the line.There is a line 194 before that has "$end = $start + 10;" and then there is line 206 with a test for the end "if ($end < $email_total) {". So if $end is greater or equal to $email_total, which are both being shown, no next URL should be returned. You could check this it your web browser's developer console network tab.Code: Select all
$json['success'] = sprintf($this->language->get('text_sent'), $end, $email_total);
I did observe that when the counter reaches about 200 out of 430. Then, instead of going by 10 at a time, it starts jumping by 100. Then it really takes off way beyond 430 and hits thousands. See screen shot I took. It made it 14000 in a matter of seconds before I stopped it.
Just added some test customers and tested with the following change and it worked fine.
To
You need to check your admin/controller/marketing/contact.php file against a clean download. Also check for the file in storage/modification.
You should then check your web browser's developer console network tab when sending and check the /admin/index.php?route=marketing/contact/send URLs &page= increments correctly.
Code: Select all
$json['success'] = sprintf($this->language->get('text_sent'), ($start * $page), $email_total);
Code: Select all
$json['success'] = sprintf($this->language->get('text_sent'), $end, $email_total);
You should then check your web browser's developer console network tab when sending and check the /admin/index.php?route=marketing/contact/send URLs &page= increments correctly.
I have another list that only contains 2 email address for Admin and it works just fine. It's when you have hundreds to send to is when it's not working.ADD Creative wrote: ↑Tue Oct 10, 2023 4:34 pmJust added some test customers and tested with the following change and it worked fine.
ToCode: Select all
$json['success'] = sprintf($this->language->get('text_sent'), ($start * $page), $email_total);
You need to check your admin/controller/marketing/contact.php file against a clean download. Also check for the file in storage/modification.Code: Select all
$json['success'] = sprintf($this->language->get('text_sent'), $end, $email_total);
You should then check your web browser's developer console network tab when sending and check the /admin/index.php?route=marketing/contact/send URLs &page= increments correctly.
That's because it does it in batches of 10. On clicking send up to the first 10 will send, the response from the site will tell the web browser to request to send the next 10. and so on.
You need to check your admin/controller/marketing/contact.php file against a clean download. Also check for the file in storage/modification. The only difference should be the bug fix.
You should then check your web browser's developer console network tab when sending and check the /admin/index.php?route=marketing/contact/send URLs &page= increments correctly.
This will help you narrow down where the problem.
You need to check your admin/controller/marketing/contact.php file against a clean download. Also check for the file in storage/modification. The only difference should be the bug fix.
You should then check your web browser's developer console network tab when sending and check the /admin/index.php?route=marketing/contact/send URLs &page= increments correctly.
This will help you narrow down where the problem.
I've not installed the bug fix that was provided above into production yet. Only on the DEV site.ADD Creative wrote: ↑Tue Oct 10, 2023 5:54 pmThat's because it does it in batches of 10. On clicking send up to the first 10 will send, the response from the site will tell the web browser to request to send the next 10. and so on.
You need to check your admin/controller/marketing/contact.php file against a clean download. Also check for the file in storage/modification. The only difference should be the bug fix.
You should then check your web browser's developer console network tab when sending and check the /admin/index.php?route=marketing/contact/send URLs &page= increments correctly.
This will help you narrow down where the problem.
I downloaded a clean version of opencart 3.0.x.x maintenance version of file: contact.php from the below link:
https://github.com/opencart/opencart/bl ... ontact.php
I then opened in NotePad++. I opened my production version of the same file from my site and they matched. See screen shot attached.
I looked into the _storage then modifications folder. Then the admin folder - controller folder but there is no marketing folder with the contact.php file.
Under the admin/controller/ folders are the below folders: Catalog, common, marketplace, sale, startup.
I will try the web browser developer console the next time I send email.
I put your change into production and sent the emails. The fix is working. Thanks again for being patient with me and help me.KandC wrote: ↑Wed Oct 11, 2023 8:04 amI've not installed the bug fix that was provided above into production yet. Only on the DEV site.ADD Creative wrote: ↑Tue Oct 10, 2023 5:54 pmThat's because it does it in batches of 10. On clicking send up to the first 10 will send, the response from the site will tell the web browser to request to send the next 10. and so on.
You need to check your admin/controller/marketing/contact.php file against a clean download. Also check for the file in storage/modification. The only difference should be the bug fix.
You should then check your web browser's developer console network tab when sending and check the /admin/index.php?route=marketing/contact/send URLs &page= increments correctly.
This will help you narrow down where the problem.
I downloaded a clean version of opencart 3.0.x.x maintenance version of file: contact.php from the below link:
https://github.com/opencart/opencart/bl ... ontact.php
I then opened in NotePad++. I opened my production version of the same file from my site and they matched. See screen shot attached.
I looked into the _storage then modifications folder. Then the admin folder - controller folder but there is no marketing folder with the contact.php file.
Under the admin/controller/ folders are the below folders: Catalog, common, marketplace, sale, startup.
I will try the web browser developer console the next time I send email.
Happy to help. I've done a pull request for the fix. Shame it's just missed the 3.0.3.9 release.
https://github.com/opencart/opencart/pull/12785/files
https://github.com/opencart/opencart/pull/12785/files
Is the Release 3.0.3.9 - the same as the 3.0.x.x version?ADD Creative wrote: ↑Mon Oct 16, 2023 5:53 pmHappy to help. I've done a pull request for the fix. Shame it's just missed the 3.0.3.9 release.
https://github.com/opencart/opencart/pull/12785/files
3.0.3.9 is the same as the current 3.0.x.x branch, but has had one of the PayPal extensions updated and the other removed compared to the last commit of the 3.0.x.x_Maintenance branch.
Perhaps at this moment in time they are the same (or similar) but 3.0.x.x_Maintenance may continue to change whereas 3.0.3.9 is a fixed version which should not change.ADD Creative wrote: ↑Tue Oct 17, 2023 5:38 am3.0.3.9 is the same as the current 3.0.x.x branch, but has had one of the PayPal extensions updated and the other removed compared to the last commit of the 3.0.x.x_Maintenance branch.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Who is online
Users browsing this forum: Amazon [Bot] and 18 guests