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
Clear all

[Closed] Users with 100 uncleared notifications stop getting popup notifications for new notifications

2 Posts
2 Users
1 Reactions
1,302 Views
Posts: 119
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
(@nando4)
Estimable Member
Joined: 9 years ago
[#13947]

Found user with more than 100 uncleared notifications ceased getting new notification popups. Looks like the following array limit in class-activity.php is the problem.  Can you please address this in next version?

 

public function get_notifications(){
$args = array( 'itemtype' => 'alert', 'userid' => WPF()->current_userid, 'row_count' => 100 );
$args = apply_filters( 'wpforo_get_notifications_args', $args );
return $this->get_activities($args);
}

1 Reply
Robert
Posts: 10744
Admin
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
(@robert)
Support Team
Joined: 3 months ago

Hi @nando4,

There is not any bugs here.

The notifications are being registered even if they are more than 100, but they'll not be displayed until you've not cleared some notifications. Only earliest 100 notifications are shown.

This is not a bug. This is a protection. If some forum is hacked and a topic has replied thousands time the page will not be crashed when it's loading the thousands of notifications. Currently, the limit is set 100 and as you can see we've added a filter hook to change the limit.

To increase the 100 displaying limit you can add this hook code to your current active theme functions.php file:

function custom_wpforo_notification_limit( $args ){
if( isset($args['row_count']) ) {
$args['row_count'] = 500;
} return $args;
}
add_filter('wpforo_get_notifications_args', 'custom_wpforo_notification_limit', 10);

 


Share: