? Success
Pull Request for # 1100

User tests: Successful: Unsuccessful:

avatar bertmert
bertmert
13 Jul 2016

Pull Request for Issue #11100 .

Summary of Changes

@csthomas
Fix for changes made in #9161

Force left JOIN over table #__content_frontpage whenever list.ordering is set to Featured Articles Order

Testing Instructions

  • Install Joomla 3.6.0 with testing datas.
  • Create new module of type Articles Category
  • Position banner. On all pages.
  • Set Filtering Options > Category > All Categories.
  • Set Filtering Options > Featured Articles > Whatever you want.
  • Set Ordering Options > Featured Articles Order

  • Go to frontend ==> empty list but PHP warnings

Warning: Invalid argument supplied for foreach() in /components/com_content/models/articles.php on line 578
Warning: Invalid argument supplied for foreach() in /modules/mod_articles_category/helper.php on line 235
  • Apply patch.

  • Try again and test other views that use same model, too, pleasepleaseplease.

avatar bertmert bertmert - open - 13 Jul 2016
avatar bertmert bertmert - change - 13 Jul 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 13 Jul 2016
Labels Added: ?
avatar bertmert bertmert - change - 13 Jul 2016
The description was changed
avatar RonakParmar RonakParmar - test_item - 13 Jul 2016 - Tested successfully
avatar RonakParmar
RonakParmar - comment - 13 Jul 2016

I have tested this item successfully on 293e5da


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

avatar brianteeman brianteeman - change - 13 Jul 2016
Category Modules
avatar brianteeman brianteeman - change - 13 Jul 2016
Rel_Number 0 1100
Relation Type Pull Request for
avatar csthomas
csthomas - comment - 13 Jul 2016

I admit I missed mentioned case in #9161.

Ordering by fp.ordering is primary ordering (only one) then may be better is to use INNER JOIN instead LEFT JOIN.

Notice that only featured articles will be returned.

I suggest to add below lines (before line 235) instead use LEFT JOIN:

elseif ($this->getState('list.ordering') == 'fp.ordering')
{
    $query->join('INNER', '#__content_frontpage AS fp ON fp.content_id = a.id');
}

What do you think?

avatar alikon alikon - test_item - 13 Jul 2016 - Tested successfully
avatar alikon
alikon - comment - 13 Jul 2016

I have tested this item successfully on 293e5da


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

avatar bertmert
bertmert - comment - 13 Jul 2016

@csthomas

Feel free to take over this PR. I don't know what the benefits are and have no arguments for this or that when people ask. I just wanted to provide a bug fix asap for 3.6.1 and "keep it warm".

avatar csthomas
csthomas - comment - 13 Jul 2016

How can I take over this PR. Should I create a new one? I'm new in github tools.

avatar bertmert
bertmert - comment - 13 Jul 2016

How can I take over this PR.

You could create a new one, inform us and I will close mine.

OR:
Log in.
Click "Files changed" tab above.
Edit my commit (github.com/bertmert/joomla-cms/edit/patch-7/.....) via pencil button
and send it as PR to my branch. Then I can merge it to this PR.

avatar csthomas
csthomas - comment - 13 Jul 2016

I withdraw my suggestion.
For now your PR is OK.

After 2 tests it should go to RTC.

For later filter.frontpage should be replaced by filter.featured and etc.

avatar killoltailored killoltailored - test_item - 15 Jul 2016 - Tested successfully
avatar killoltailored
killoltailored - comment - 15 Jul 2016

I have tested this item successfully on 293e5da


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

avatar wronax
wronax - comment - 15 Jul 2016

@csthomas
In my opinion you can't use INNER JOIN, because this is only an ordering option, so it shouldn't exclude not featured articles, but put them after all featured articles on the list.

There is dedicated filter to display only featured articles and I can agree that it's better to use INNER JOIN, but only if this filter is set to display only featured articles.

avatar csthomas
csthomas - comment - 15 Jul 2016

Yes I have seen it too, then I withdrew/back my suggestion.

There is place for more work for other PR,
ex sometimes there is 'filter.frontpage' but other time 'filter.featured'

avatar bertmert
bertmert - comment - 16 Jul 2016

Shouldn't this one get a RTC ? Would be nice to see it in 3.6.1 because it's fixing a bug.

avatar andrepereiradasilva
andrepereiradasilva - comment - 19 Jul 2016

@brianteeman RTC for 3.6.1 ?

avatar bertmert
bertmert - comment - 26 Jul 2016

@brianteeman
Sorry for pushing! Is there a reason why no RTC? Even if there were some discussions all agreed in the end that this PR (bug-fix) is OK.

avatar infograf768 infograf768 - change - 26 Jul 2016
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 26 Jul 2016

RTC

@wilsonge

3.6.1 ?


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

avatar joomla-cms-bot joomla-cms-bot - change - 26 Jul 2016
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 26 Jul 2016
Category Modules Front End Components
avatar wilsonge wilsonge - change - 26 Jul 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-07-26 09:42:17
Closed_By wilsonge
avatar wilsonge wilsonge - close - 26 Jul 2016
avatar wilsonge wilsonge - merge - 26 Jul 2016
avatar joomla-cms-bot joomla-cms-bot - close - 26 Jul 2016
avatar joomla-cms-bot joomla-cms-bot - change - 26 Jul 2016
Labels Removed: ?
avatar wilsonge
wilsonge - comment - 26 Jul 2016

Merged. Thanks guys

Add a Comment

Login with GitHub to post a comment