Update: I have confirmed it is the Slim-Plus template that is causing the error as I reverted to the default template and it works fine.