Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix raw template being returned by SingleLogoutResponse.php #1192

Merged
merged 2 commits into from Aug 28, 2019

Conversation

@tvdijen
Copy link
Member

commented Aug 28, 2019

We need a little hack to enforce the use of Twig, even if newui is set to false.
It's either this, or revert to inline HTML in our PHP-files..

Fixes #1191

tvdijen added 2 commits Aug 28, 2019

@tvdijen tvdijen added this to the 1.18 milestone Aug 28, 2019

@tvdijen tvdijen merged commit 0469e81 into master Aug 28, 2019

5 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.04%) to 35.017%
Details

@tvdijen tvdijen deleted the simplesamlphp-bugfix-slo branch Aug 28, 2019

tvdijen added a commit that referenced this pull request Aug 28, 2019
@jaimeperez

This comment has been minimized.

Copy link
Member

commented Aug 29, 2019

I don't think this is the right way to fix this. Forcing the use of a twig template when using the old user interface could bring all kinds of unforeseen consequences. Not saying I don't trust twig templates to work properly (we're using them in production in Feide and it works incredibly well), but the mix of PHP and twig templates and forcing them when configuration says the contrary is what makes me nervous here.

It's probably ok, but I would still prefer to get rid of this hack and solve it with a PHP template.

@tvdijen

This comment has been minimized.

Copy link
Member Author

commented Aug 29, 2019

We would have to do this in several places then, because the same trick is being used in, for example, the EMail-class... I hope I can find all of them back

@jaimeperez

This comment has been minimized.

Copy link
Member

commented Aug 29, 2019

I can take care of this one, since I'm the one requesting it. If you remember any others, would you mind doing the same?

@tvdijen

This comment has been minimized.

Copy link
Member Author

commented Aug 29, 2019

Sure thing! Please don't forget to also backport it to the 1.17-branch

@tvdijen

This comment has been minimized.

Copy link
Member Author

commented Aug 29, 2019

The EMail-class is a bit tricky.. I don't see how I could use a tpl.php file there..
The main issue is that there is no way to retrieve the parsed content, so I already had to use a little trick to fix that for Twig-templates here.. If I would have to do that for tpl.php templates (that just echo content) we would end up buffering output.. Is that really what we want?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.