?
avatar ronaldhoek
ronaldhoek
19 Aug 2015

Steps to reproduce the issue

Create new newsfeed with the url:

http://www.volleybal.nl/application/handlers/export.php?format=rss&type=vereniging&programma=8151&iRegionId=7000

On the 'Display' tab, set the 'Feed Display Order to' 'Oldest first'
Load the feed using an menu-item or some others means.

Expected result

No errors!

Actual result

The following errors are displayed (along the the content)

Notice: Undefined property: stdClass::$items in D:\Xampp\htdocs\hwvvbenevia\components\com_newsfeeds\views\newsfeed\view.html.php on line 191

Warning: array_reverse() expects parameter 1 to be array, null given in D:\Xampp\htdocs\hwvvbenevia\components\com_newsfeeds\views\newsfeed\view.html.php on line 191

System information (as much as possible)

Using Joomla 3.4.3

  • XAMPP 3.2.1
  • Apache/2.4.16 (Win32) OpenSSL/1.0.1p
  • PHP/5.6.11
  • MySQL 5.6.25

Additional comments

To remove the error, modify line 69 $items = $categoryModel->getItems(); in the following $item->items = $categoryModel->getItems();

The error will no longer be shown, however it seems the sorting functionality does not work art all :(.
Maybe a result of the complete rewrite of the newsfeed code starting with Joomla 3.0

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
4.00

avatar ronaldhoek ronaldhoek - open - 19 Aug 2015
avatar ronaldhoek ronaldhoek - change - 19 Aug 2015
The description was changed
avatar peterpeter
peterpeter - comment - 8 Nov 2015

I can confirm this issue - in 3.4.5 and staging.
The fix above fills only the empty member $item->items that is used in a array_reverse() (as $newsfeed->items). So the notice disapear. However, this member is not used for displaying the feed, and thus the ordering 'oldest first' doesn't come into effect.


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

avatar peterpeter
peterpeter - comment - 8 Nov 2015

I had a little time, so made a PR/Fix for that issue: #8347 ready for testing.


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

avatar zero-24
zero-24 - comment - 8 Nov 2015

Thanks. Closing as we have a PR :)

avatar zero-24 zero-24 - change - 8 Nov 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-11-08 21:20:45
Closed_By zero-24
avatar zero-24 zero-24 - close - 8 Nov 2015
avatar zero-24 zero-24 - close - 8 Nov 2015
avatar ronaldhoek
ronaldhoek - comment - 9 Nov 2015

Working perfectly - thanks!

Add a Comment

Login with GitHub to post a comment