Project

General

Profile

Actions

Bug #90769

closed

Failure of AbstractRssWidget.php breaks dashboard

Added by Christian Hackl about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Category:
Dashboard
Target version:
Start date:
2020-03-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If the RSS feed cannot be obtained, an error (attachment) is thrown regarding the AbstractRssWidget.php so that the dashboard is not displayed at all.

This means that no widget will be displayed that is not affected by the error.

Example quick workaround line 87:
First, this exception would have to be caught differently, and the code that comes after this "if" would have to be put into an else:

if ($rssContent === false) {
    // TODO: Log this error
    // throw new RuntimeException('RSS URL could not be fetched', 1573385431);
} else {
    $rssFeed = simplexml_load_string($rssContent);
    $itemCount = 0;
    foreach ($rssFeed->channel->item as $item) {
        if ($itemCount < $this->limit) {
            $this->items[] = [
                'title' => (string)$item->title,
                'link' => trim((string)$item->link),
                pubDate => (string)$item->pubDate,
                'description' => (string)$item->description,
            ];
        } else {
            continue;
        }
        $itemCount++;
    }
    $this->cache->set($cacheHash, $this->items, ['dashboard_rss'], $this->lifeTime);
}

To display all widgets that are not affected by the error.


Files

AbstractRssWidget.jpg (305 KB) AbstractRssWidget.jpg Christian Hackl, 2020-03-17 12:45
Actions #1

Updated by Christian Hackl about 4 years ago

Forgot attachment

Actions #2

Updated by Georg Ringer about 4 years ago

  • Status changed from New to Accepted
  • Assignee set to Richard Haeser
  • Target version set to 10 LTS
Actions #3

Updated by Richard Haeser about 4 years ago

  • Status changed from Accepted to Closed

This is fixed in current master

Actions

Also available in: Atom PDF