1. Create a new category without assigning any feeds to it (not sure if its relevant yet)
  2. Visit aggregator/categories
  3. Bam, site dead : Fatal error: Call to undefined method stdClass::label() in /var/www/d8/core/modules/aggregator/aggregator.pages.inc on line 566

Comments

berdir’s picture

Status: Active » Needs review
StatusFileSize
new1.33 KB

Confirmed.

Will need some tests, aggregator tests are still parse, there is a long-standing open issue about adding better test coverage.

berdir’s picture

ParisLiakos’s picture

thanks for patch berdir!

+++ b/core/modules/aggregator/aggregator.pages.incundefined
@@ -563,7 +564,7 @@ function theme_aggregator_page_opml($variables) {
+  $variables['title'] = check_plain($variables['source'] instanceof EntityInterface ? $variables['source']->label() : $variables['source']->title);

maybe ternary should be out of check_plain

But, this code is temporary, i will start working on #15266: Replace aggregator category system with taxonomy next week and more tests, so if bot comes back as expected i will rtbc this

Status: Needs review » Needs work

The last submitted patch, aggregator-category-fatal-error-1920744-2-test-only.patch, failed testing.

berdir’s picture

Status: Needs work » Needs review

Failed/passed as expected, back to needs review.

ParisLiakos’s picture

Status: Needs review » Reviewed & tested by the community

like i said^^

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Hm. This fix is really unfortunate. :( However, I talked to Berdir and rootatwc and we require #15266: Replace aggregator category system with taxonomy in order to move back to the old version. Since hacks in an optional module are preferable to fatal errors in an optional module, I decided to commit this. root said he'd take a look at that issue next week.

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.