New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the count in Element/TemplateGetList processor #16160
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works fine, however when you select a template from the second "page" it doesn't select this template after you refresh and open the template picker again. This works fine for templates from the first page.
Not a showstopper, just something I've noticed.
This must be an Ext JS issue and has to be investigated later. |
During my tests it worked: If the selected Template is on page 2, the right template will be selected, when you go to page 2 in the combo. It is not possible to have page 2 automatically opened, since the current value is not sent in the request that retrieves the paginated list. This can be somehow done in the combo code, but then the page has to calculated with a minimum of database queries. Is this possible? |
Indeed it does! Thanks.
I'm fine if we leave it like it is for now. For me it's not a real problem that needs to be solved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does the job. I am curious though why it is not necessary to set the limit to 0 on the template combo config (not the picker variation) — somehow the processor's default of 20 is being overridden, right?
The default pagination of a combo is set with the pageSize property of 20 in Ext JS. |
I understand the pagination config. It's the limit of total results (which wasn't working before, but now is). Why would the query only fetch a total of 20 before this fix? |
Before, the count query was sorted by a missing column, which returned a total of 0 then. This disabled the pagination. The final query for the results contains the missing column (it is added in prepareQueryAfterCount). The processor uses also an internal default limit of 20. |
What does it do?
combo
propertyWhy is it needed?
combo
property contains a boolean value and not a string or an integer.How to test
Related issue(s)/PR(s)
#16135, this PR improves and replaces #16145