[4.0] Frontend: Fix List Contacts Category List Limit#30904
[4.0] Frontend: Fix List Contacts Category List Limit#30904rdeutz merged 2 commits intojoomla:4.0-devfrom
Conversation
|
I have tested this item ✅ successfully on 5d62196 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30904. |
1 similar comment
|
I have tested this item ✅ successfully on 5d62196 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30904. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30904. |
|
Sorry why should we hard code the default to 20? and what's the problem with our configuration option? don*t we use the same functionality in com_content? |
|
I only looked at the code - $limit = $app->getUserStateFromRequest('global.list.limit', 'limit', $app->get('list_limit'), 'uint');
+ $limit = $app->input->get('limit', $app->get('list_limit', 20), 'uint');and getuserstatefromrequest should do the same as input->get but also set the user preference in the session. Edit: I miss read this as remove of the default, but it removes the com_contact .xml options if i'm not wrong? |
Nope. We do not have a The contact specific field option in the xmls ( before the patch we had in Contacts CategoryModel:
joomla-cms/components/com_content/src/Model/ArticlesModel.php Lines 94 to 95 in 06fe4d2
That's what it is called for articles list. COM_CONTENT_FORM_FILTER_SUBMIT="Filter"I have not changed this. Just mimicked it for contacts by using a Global string JGLOBAL_FILTER_BUTTON. It can be modified globally for all similar lists in frontend by using JSEARCH_FILTER_SUBMIT if desired.I remind you that you tested that PR OK and the layout does not change with this patch. It should be tested with a 4.0-dev test site where npm ci has been run. #30813 (comment) Folks, I basically have done all these contacts related frontend list refactoring PRs based on what we already have for articles. |
|
As requested modified to use back |
|
I have tested this item ✅ successfully on daf7d61 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30904. |
1 similar comment
|
I have tested this item ✅ successfully on daf7d61 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30904. |
|
@HLeithner |


Pull Request for Issue #30813 (comment)
Summary of Changes
The existing code prevents modifying the list limit as it is forced or by the Global Contacts List Layout Options, or the
List Contacts in a Categorymenu item params.This normalizes the use of list limit, as done for other lists displaying in frontend, by deleting both fields and modifying the model code. Default is set to 20.
Testing Instructions
Create some contacts in a category.
Create a
List Contacts in a Categorymenu item.Display the menu item in frontend.
Try to modify the list limit
Patch and test again.
Actual result BEFORE applying this Pull Request
Expected result AFTER applying this Pull Request