codefog/contao-news_categories

Description insert tag with multiple categories selected

rburch opened this issue · 3 comments

When using the description insert tag and multiple categories at once Contao logs a system error that looks like this: Unknown insert tag {{news_categories::description}} on page https://ampersandart.com/blog/category/featured-artists__ambassadors

I'm guessing that if two categories are chosen the tag should know and just show nothing instead of logging an error. It wouldn't be so bad, but the site gets a fair amount of traffic so in one day we're making a pretty big system log file because of all the errors.

Here's the site so you can see what we're doing a bit: https://ampersandart.com/blog/category/featured-artists

Bob

Should be fixed in 3.4.12 which I have released just now.

Here's our work around for now.

`categories), 0, -1); ?>

			<?php if(substr_count($this->categories, ",") == 1){ ?>
				{{news_categories::description}}
			<?php } ?>
			<?php
		}
?>`

Wow, great work!