Element TEMPLATEDIRECTORY is undefined in APPLICATION.