lms
lms copied to clipboard
Nie zawsze działa "phpui.custom_templates_dir"
Mam ustawiony phpui.custom_templates_dir. Cześć szablonów ładuje się custom-owych, a część z default. Przykładowo. nodeinfo.html ładuje custom invoicereport-ext.html ładuje default
Struktura plików jest OK, bo jak usunę domyślny szablon to ładuje ten własny.
ls templates/netarea/ -R
templates/netarea/:
invoice node print
templates/netarea/invoice:
invoicereport-ext.html
templates/netarea/node:
nodeinfobox.html nodeinfo.html
templates/netarea/print:
printcustomerlist.html printcustomerlist-sendingbook.html printindex.html
Kolejność w gettemplatedir() wygląda zawsze tak samo:
array(4) {
[0]=>
string(1) "/"
[1]=>
string(36) "/var/www/html/lms/templates/netarea/"
[2]=>
string(36) "/var/www/html/lms/templates/default/"
[3]=>
string(28) "/var/www/html/lms/templates/"
}
Co ciekawe jak w module invoicereport zamiast
$SMARTY->display('invoice/invoicereport-ext.html');
zrobiłem
$SMARTY->display('file:invoice/invoicereport-ext.html');
to zaczął ładować custom template. Identyczny skutek daje ustawienie
$SMARTY->default_resource_type = "file";
Nie wiem czy to błąd SMARTY czy trzeba poprawiać LMSa?
Jeszcze dla formalności.
dbschversion => "2019042400"
v_errors => null
smarty_version => "3.1.33"
logid => "1"
lmsdbv => "2019042400"
hostname => "74d05f71391f"
lmsv => "24"
lmsvr => ""
dberrors => Array (0)
dbdebug => false
popup => false
module => "invoicereport"
więc niby błąd https://github.com/lmsgit/lms/issues/547 nie dotyczy.
https://github.com/smarty-php/smarty/issues/123#issuecomment-172532910
@seba11 czy to zgłoszenie jest aktualne?
(widzę tutaj bugfixa: https://github.com/smarty-php/smarty/issues/183)