salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.27k stars 2.03k forks source link

fix skip to last page if disable_count_query=true #10409

Closed cyb456 closed 1 month ago

cyb456 commented 2 months ago

Pressing the skip to last page button in subpanels would result in 9 results showing instead of the default configured ten. This only happens if disable_count_query in the config is set to true. This config option does not appear by default any more so this issue will almost never come up, but still can be found on google: https://community.suitecrm.com/t/slow-suitecrm-with-large-database/33848/3 The previous employee in my position had set this config option to true in a bad attempt to fix performance issues many years ago.

Description

Motivation and Context

How To Test This

set disable_count_query=true in a config option create contacts named test01 through test30 for an account press skip to last page button on contacts subpanel in that account notice that test30 is not present spend hours tracking down this bug just to realize you could have set disable_count_query=false

Types of changes

Final checklist

serhiisamko091184 commented 2 months ago

Hi @cyb456,

thanks for your contribution!

Regards, Serhii