-
Bug
-
Resolution: Fixed
-
Major
-
3.1.0-dev
-
None
I'm not sure where exactly error is, I suspect its in finder class. When searching for templates, for some reason in addition to matching directories, it adds inner directories of those directories to list.
How to test it: install extension that has directory styles/prosilver/template
Open includes/template/locator.php, find function set_paths() and at the end of function write this:
echo '<pre>', print_r($this->roots, true), '</pre>';
Open forum page, it will show this result:
Array
(
[0] => ./ext/example/styles/prosilver/template
[1] => ./styles/prosilver/template
)
That result is correct. Now create a directory inside extension's template directory, for example, ext/example/styles/prosilver/template/test1, clear cache and open page in browser. Result will be this:
Array
(
[0] => ./ext/example/styles/prosilver/template
[1] => ./ext/example/styles/prosilver/template/test1
[2] => ./styles/prosilver/template
)
Item #1 should not be there. If you create more directories inside template directory, all directories will appear in that list.
That item is being added to roots array 2 lines above that debug output, variable $template_paths is instance of phpbb_template_extension_path_provider class, incorrect directories seems to be retrieved in function find() in includes/template/extension_path_provider.php that uses finder class to find them.