'Found multiple templates' warning in console.log on publish

Hi there,

I have some content items with multiple page templates. In a snippet I’m using $rx.location.generate to get the URL for this item. I’m specifying what template to use, and it seems to be working right. But it is generating the following warning in the logs:

WARN [PSLocationUtils] Found multiple templates: [cnIndustryProducts_PageTemplate, cnIndustryServices_PageTemplate] picking: cnIndustryProducts_PageTemplate

I’m curious what the meaning of the warning is. It would also be nice to suppress it since it happens in a loop and is printing a lot of lines to the console.log.

Thanks.

I get that everytime dispatch template is “hit”. Really, should be just an info log entry, not warning. No idea how to suppress it.

Hi April

This is because you have multiple “default” templates. If you’re using a dispatch template the templates cnIndustryProducts_PageTemplate and cnIndustryServices_PageTemplate should be set to “never” publish and let the dispatch template choose the correct one.

Cheers
James