The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Search
Close
AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications for n...
 
Notifications
Clear all

Issue Notifications for new comments are not always sent

2 Posts
1 Users
0 Reactions
1,160 Views
Posts: 2
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@lbm-diseno-web)
New Member
Joined: 2 years ago
[#7802]

Hello,

I am experiencing a problem in notifications of new comments to users.

The problem is that sometimes users do not receive the notifications in their mailbox.

After doing dozens of tests, we have come to the conclusion that the problem is that the execution of the action "wpdCheckNotificationType" depends on the user.

When a user submits a comment, the "wpdAddComment" action is executed first and if successful, then the "wpdCheckNotificationType" action is executed. These actions are executed with an Ajax call which I believe is in the wpdiscuz.js file in the getAjaxObj function.

What is the problem? If you have a large number of subscribers (2K or 3K) the script can take several minutes to execute, and if the user exits the page or closes the browser, this script doesn't seem to finish executing.

In the two tests performed, in a comment with 160 subscribers only 27 notifications have been sent and in another test, with 274 subscribers it has been sent to 257.

This could be solved in two ways:
1. Saving the notifications to be sent in a table and the wp_cron would send them in blocks.
2. Using the Beacon API of javascript so that the sending would not be cancelled when leaving the page.

This second solution could be as simple as substituting this:

[I attach an image with the suggested code change because Wordfence blocks me].

beacon

This would allow calls to actions not to be cancelled halfway through.

Yours sincerely,
Luis


1 Reply
Posts: 2
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@lbm-diseno-web)
New Member
Joined: 2 years ago

We have continued testing and closing the window does not kill the request. The request continues to execute.

However, on several occasions the sending of notifications gets stuck halfway and we can't find the reason.

Can you help us?


Reply
Share: