tpl: Fix the case for a shortcode in a nested folder only

Fixes #13605
This commit is contained in:
Bjørn Erik Pedersen 2025-04-14 11:41:56 +02:00
parent 8a2830f2dc
commit cf9e6904cc
3 changed files with 38 additions and 10 deletions

View file

@ -677,13 +677,7 @@ Loop:
// Used to check if the template expects inner content,
// so just pick one arbitrarily with the same name.
q := tplimpl.TemplateQuery{
Path: "",
Name: sc.name,
Category: tplimpl.CategoryShortcode,
Consider: nil,
}
templ := s.s.TemplateStore.LookupShortcode(q)
templ := s.s.TemplateStore.LookupShortcodeByName(sc.name)
if templ == nil {
return nil, fmt.Errorf("%s: template for shortcode %q not found", errorPrefix, sc.name)
}