? ? Pending

User tests: Successful: Unsuccessful:

avatar chmst
chmst
23 Aug 2020

Pull Request for Issue #30445 .

Summary of Changes

Add a filter.condition for published articles to mod_articles_latest.

Testing Instructions

See the related #30445 .

Actual result BEFORE applying this Pull Request

Unpublished articles are shown in the Module mod_articles_latest.

Expected result AFTER applying this Pull Request

Only published articles are shown in the Module mod_articles_latest.

Documentation Changes Required

no

avatar chmst chmst - open - 23 Aug 2020
avatar chmst chmst - change - 23 Aug 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Aug 2020
Category Modules Front End
avatar chmst chmst - change - 23 Aug 2020
Title
Fix mod_articles_latest
[4.0] Fix mod_articles_latest
avatar chmst chmst - change - 23 Aug 2020
Easy No Yes
avatar chmst chmst - edited - 23 Aug 2020
avatar SharkyKZ
SharkyKZ - comment - 24 Aug 2020

Is there any reason why state/condition filter is called filter.published in backend and filter.condition in backend?

avatar chmst
chmst - comment - 24 Aug 2020

@SharkyKZ I don't know. The filter should have the same name as in J3.x for 3rd party extensions. This is a quick fix for the issue.

avatar paternax
paternax - comment - 24 Aug 2020

It works like it should with this patch

avatar sandewt sandewt - test_item - 24 Aug 2020 - Tested successfully
avatar sandewt
sandewt - comment - 24 Aug 2020

I have tested this item successfully on c1498f4

Joomla! 4.0.0-beta4-dev Development [ Mañana ] 29-July-2020 18:21 GMT

See comment.


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

avatar richard67
richard67 - comment - 24 Aug 2020

It works like it should with this patch

@paternax Does it mean you have tested this pull resuest with success? If so, could you mark your test result on the issue tracker? Just follow this link https://issues.joomla.org/tracker/joomla-cms/30459 and then use the "Test this" button. Then select your appropriate test result ("succes" in this case) and submitt. Thanks in advance.

avatar sandewt
sandewt - comment - 24 Aug 2020

Is there any reason why state/condition filter is called filter.published in backend and filter.condition in backend?

$model->setState('filter.published', 1) DOESN'T WORK !

This following code works as alternative for: $model->setState('filter.condition', 1);

use Joomla\Component\Content\Administrator\Extension\ContentComponent;
...
$model->setState('filter.condition', ContentComponent::CONDITION_PUBLISHED);

[EDIT]


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30459.
avatar SharkyKZ
SharkyKZ - comment - 24 Aug 2020

@chmst So it should be filter.published. I guess #29235 just forgot to make replacements in frontend models. Maybe @bembelimen or @HLeithner knows.

avatar chmst
chmst - comment - 24 Aug 2020

Then it would be good th have this merged soon. And make complete change for the filter name.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30459.
avatar HLeithner
HLeithner - comment - 24 Aug 2020

Yes seems like we oversee this, it should be filter.published iirc there should be no condition keyword more in frontend.

avatar paternax paternax - test_item - 24 Aug 2020 - Tested successfully
avatar paternax
paternax - comment - 24 Aug 2020

I have tested this item successfully on c1498f4


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

avatar richard67
richard67 - comment - 24 Aug 2020

@HLeithner So this one here is ok so far, and the rest can be fixed with a new PR?

@chmst Can you do that?

avatar richard67 richard67 - change - 24 Aug 2020
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 24 Aug 2020

RTC


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

avatar richard67 richard67 - change - 24 Aug 2020
Labels Added: ? ?
avatar chmst
chmst - comment - 24 Aug 2020

@richard67 I'll prepare a PR for that

avatar wilsonge wilsonge - change - 25 Aug 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-08-25 16:59:16
Closed_By wilsonge
Labels
avatar wilsonge wilsonge - close - 25 Aug 2020
avatar wilsonge wilsonge - merge - 25 Aug 2020
avatar wilsonge
wilsonge - comment - 25 Aug 2020

Merging this one as above then. Thanks!

Add a Comment

Login with GitHub to post a comment