? ? Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
23 Jul 2021

Pull Request for Issue # .

Summary of Changes

In frontend Categories model of our components (com_content in this PR), there are few logic issues:

  • $params in getItems method use params from the active menu item instead of calculated params stored in model states. With code like that, it will have wrong value for parameters set to Use Global in the menu item parameters (as it Use Global, it should get value from component Options but that's not working here because we are getting params directly from active menu item at the moment).

  • The returned categories list does not depend on value of two model states filter.access and filter.published. So if someone uses this model class and want to get list of unpublished categories (by setting filter.published state to 0, it won't work)

This PR fixes the two above logic issues in the code. If it is accepted, the similar changes should be done for other categories.

Testing Instructions

This is just code logic issues and does not have much effect how the system works, so there is not anything difference which testers can see. The only thing you can test is apply PR, create a menu item to link to List All Categories in an Article Category Tree and see that it is still working as expected.

I hope someone could review code, too.

avatar joomdonation joomdonation - open - 23 Jul 2021
avatar joomdonation joomdonation - change - 23 Jul 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Jul 2021
Category Front End com_content
avatar joomdonation joomdonation - change - 23 Jul 2021
The description was changed
avatar joomdonation joomdonation - edited - 23 Jul 2021
avatar richard67
richard67 - comment - 23 Jul 2021

Are there any issues which are solved with this fix? If so, it would be good to find and close them.

avatar joomdonation
joomdonation - comment - 23 Jul 2021

@richard67 I don't think so. It is just code logic I found when I tried to find a solution for the issue #34866 .

avatar joomdonation joomdonation - change - 24 Jul 2021
Labels Added: ?
avatar socke300 socke300 - test_item - 17 Aug 2021 - Tested successfully
avatar socke300
socke300 - comment - 17 Aug 2021

I have tested this item successfully on da420f1

Hey, I have tested the changes and tried different settings.
I didn't notice anything else, except for the problem with sorting. #34866
It is still working as expected.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34883.

avatar BertaOctech BertaOctech - test_item - 17 Sep 2021 - Tested successfully
avatar richard67
richard67 - comment - 19 Sep 2021

@BertaOctech I just notice you have marked a test result, but not with the "Test this" button. It seems you have used "Alter test". Does that mean you have tested this pull request with success?

avatar BertaOctech BertaOctech - test_item - 20 Sep 2021 - Tested successfully
avatar BertaOctech
BertaOctech - comment - 20 Sep 2021

I have tested this item successfully on da420f1

@richard67
Hi,

Yes, you are right.

I did test the patch and I could not find anything wrong with it.

Cheers,

Berta


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34883.

avatar richard67 richard67 - change - 20 Sep 2021
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 20 Sep 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34883.

avatar richard67
richard67 - comment - 20 Sep 2021

@wilsonge I leave the decision to you with respect of the above review discussion.

avatar bembelimen bembelimen - change - 21 Jan 2022
Labels Added: ? ? ?
Removed: ?
avatar richard67 richard67 - change - 31 Jan 2022
Title
[4.0] Fix code logic issues in Categories model
[4.1] Fix code logic issues in Categories model
avatar richard67 richard67 - edited - 31 Jan 2022
avatar Quy Quy - change - 2 Feb 2022
Labels Added: ?
Removed: ?
avatar bembelimen
bembelimen - comment - 12 Mar 2022

For me it's an absolutely valid PR which makes it more correct. So definitely a "yes" to get it in core, but a "no" for 4.1.x. So move to 4.2 for now (and most likely it has to go to 5.0 as @laoneo mentioned.

avatar bembelimen bembelimen - change - 12 Mar 2022
Title
[4.1] Fix code logic issues in Categories model
[4.2] Fix code logic issues in Categories model
avatar bembelimen bembelimen - edited - 12 Mar 2022
avatar bembelimen bembelimen - change - 12 Mar 2022
Labels Added: ?
avatar laoneo
laoneo - comment - 12 Mar 2022

Removed RTC as it is easy to do it in a BC way. When done we can add RTC again.

avatar richard67
richard67 - comment - 12 Mar 2022

Removed RTC as it is easy to do it in a BC way. When done we can add RTC again.

@laoneo For removing RTC it needs to change status in the issue tracker, not just to remove the label.

avatar richard67 richard67 - change - 12 Mar 2022
Status Ready to Commit Pending
avatar richard67
richard67 - comment - 12 Mar 2022

Back to pending.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34883.

avatar joomla-bot
joomla-bot - comment - 27 Jun 2022

This pull requests has been automatically converted to the PSR-12 coding standard.

avatar Hackwar Hackwar - change - 21 Oct 2022
Labels Added: ? ?
Removed: ? ? ?
avatar joomdonation joomdonation - change - 29 Dec 2022
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2022-12-29 15:11:50
Closed_By joomdonation
Labels Removed: ?
avatar joomdonation joomdonation - close - 29 Dec 2022

Add a Comment

Login with GitHub to post a comment