config files and templates: fix deprecation warnings
(cherry picked from commit 9b372b4c796740bfe1510fd2af4e1d689857a638)