Page MenuHomePhabricator

[News] extension fails on 1.22. Feed page says "no feed found on page"
Closed, InvalidPublic

Description

Author: richard-oss

Description:
Upgrading to MediaWiki 1.22.4, and the News extension stopped working.

The tag I use is <newsfeed>. The feed content renders fine in the page, but when following the <newsfeedlink> I get a page with the following:

"<h1>Not Found</h1><p>no feed found on page: [my feed name]</p>"

Others report the problem here:
https://www.mediawiki.org/wiki/Extension_talk:News#no_feed_found_on_page:

The suggested workaround is to change lines 53-54 of NewsRenderer.php from

$article->getContent();
$text = $article->mContent;

To

$text = $article->getContent();

I can confirm this works, but the documentation warns that Article::getContent is deprecated, and that it has side effects.


Version: REL1_22-branch
Severity: blocker
OS: Linux
Platform: PC

Details

Reference
bz63716

Related Objects

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:09 AM
bzimport set Reference to bz63716.
bzimport added a subscriber: Unknown Object (MLST).

richard-oss wrote:

I tried:

$page = $article->getPage();
$text = $page->getContent();

But the data structure isn't right, so nothing is returned.

Extension doesn't look too maintained to me.

richard-oss wrote:

I think the long term fix is to adapt the parser to the result of WikiPage->getContent(), but I don't have a MediaWiki development environment and I am having a hard time seeing what is returned from tha call.

It is interesting that the feed content is correctly displayed on the wiki page with the <newsfeed> tag. If I can identify where that is happening, I can try to use the same process here. There should probably be a single function to do it for both places, and then hand them to different formatting functions for the display. I'm not clear on how much work the parser is doing.

Aklapper lowered the priority of this task from Low to Lowest.Sep 24 2016, 7:02 PM