Project

General

Profile

Actions

Bug #90769

closed

Failure of AbstractRssWidget.php breaks dashboard

Added by Christian Hackl over 4 years ago. Updated over 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

Also available in: Atom PDF