Sorry for all the questions lately but this one is striking me as both odd and mysterious.
For this project we're enforcing full privacy for content except a few public static pages. Accordingly, I've over-ridden the template "default" html file using if/else to display a login message if the viewer is a guest and otherwise display content if logged-in. I'm also including overrides for the "component" and "error" html files but only for minor cosmetic adjustments, but both allow publicly-viewable content. For good measure, I've also added a new "public" html file that I'm pointing the front-page to use which does not check viewer status.
This is all functioning as expected on my development server.
I noticed that the "token" page requires public view-ability but is generated using the "default" html file - which in my setup displayed a "login to view" message. So, I have added an override for the "token" file under com_people in the template/html directories which adds
@service('application.dispatcher')->getRequest()->tmpl = 'component'
This works perfect on my development server. It also works if I use tmpl='public'.
Odd thing though, is that when do the same on my Amazon EC2 server the "token" override does not seem to work - it's displaying the "login to view" message.
I've even gone so far as to copy the entire full template package from the development server (working) to the EC2 server - and it still doesn't work like it is on the development server.
Would something in the server environment cause the same exact template override to function differently than on another environment? All other overrides on the EC2 are working exactly as on the development server, just this one exception.