Error on viewing recipients

4 months 3 weeks ago #1 by Daniel
Error on viewing recipients was created by Daniel
Hi,

I get the following error on trying to view recipients list.

Many Thanks,

Dan

This message has an attachment image.
Please log in or register to see it.

Please Log in or Create an account to join the conversation.

4 months 3 weeks ago #2 by Christopher Mavros
Replied by Christopher Mavros on topic Error on viewing recipients
Hi Dan and thank you for posting!
Can you please re-install NS Pro without uninstalling and check if this error persists?

Christopher Mavros
mavrosxristoforos@gmail.com
If you like our extensions, please rate us on the JED!

Please Log in or Create an account to join the conversation.

4 months 3 weeks ago #3 by Daniel
Replied by Daniel on topic Error on viewing recipients
Hi Christopher,

Thanks for the quick reply. I've done that and flushed the caches out etc.

Problem is still there.

Dan
The following user(s) said Thank You: Chris

Please Log in or Create an account to join the conversation.

4 months 3 weeks ago #4 by Chris
Replied by Chris on topic Error on viewing recipients
I get the same error. This occurs when I try to filter the recipients based on "Selected Opened" option.

Please Log in or Create an account to join the conversation.

4 months 3 weeks ago #5 by Chris
Replied by Chris on topic Error on viewing recipients
From what I can tell, the problem exists in the NsproModelRecipients class and the _getListCount function. Since that function also exists in the base class (ListModel), I just commented it out and that solved the problem.
The following user(s) said Thank You: Daniel

Please Log in or Create an account to join the conversation.

4 months 3 weeks ago #6 by Christopher Mavros
Replied by Christopher Mavros on topic Error on viewing recipients
TL;DR
Hi everyone! I fixed this bug and it will be included in the next release. If you need it earlier, please email me at me@mavrosxristoforos.com, or avoid filtering the Recipients view by "Opened" or by "Mailing Lists".

Long answer
Chris, your debugging helped a lot.
The problem was indeed in theĀ _getListCount function, which essentially provides Joomla with the total number of records for a table.

Since the recipients table grows really fast when you send newsletters, the default Joomla _getListCount function becomes slow, because it performs the same joins as the actual getItems, twice.
In order to save a good deal of more than 8 seconds page loading time when this table is really big, I removed all joins from this function. However, when you filter the view by newsletter openings or by "Unassigned" mailing lists, you need the table joins, hence the error.

As mentioned earlier, I have now added a fix which will be included in the next version.

Christopher Mavros
mavrosxristoforos@gmail.com
If you like our extensions, please rate us on the JED!
The following user(s) said Thank You: Daniel

Please Log in or Create an account to join the conversation.

Moderators: Christopher Mavros