-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
See my comment in #298 (comment).
I defined a pattern in a module using a yml file, and I noticed that the theme hook had a path starting with a leading slash.
E.g. /modules/custom/my_module/templates/patterns/my_pattern/pattern-my-pattern.html.twig
.
The problem seems to be the str_replace() in PatternBase
and LibraryPattern
, which is meant to remove the absolute part from the pattern path.
$definition_base_path = '/var/www/html/web/modules/custom/my_patterns/templates/patterns/my_pattern';
$root = '/var/www/html/web';
$path = str_replace($root, '', $definition_base_path);
print $path === '/modules/custom/my_patterns/templates/patterns/my_pattern' ? 'problem' : 'ok';
I am a bit confused why this was not reported as broken before. Am I doing something wrong?
Going to post a minimal PR and we'll see which test blows up.
Metadata
Metadata
Assignees
Labels
No labels