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 EZP-22858: Display in HTML Comments name of the used template #1066

Merged
merged 2 commits into from Nov 3, 2014

Conversation

lolautruche
Copy link
Contributor

https://jira.ez.no/browse/EZP-22858
Replaces #860

This PR is an enhancement of #860.
It ensures that start/stop template comments are correctly displayed for layout templates, to avoid quirks with some (old) browsers.

  1. Start comment after DocType declaration
  2. Stop comment before </body>

This only affects HTML templates

flovntp and others added 2 commits November 3, 2014 08:17
To avoid display quirks with some (old) browsers

1. Start comment **after** DocType declaration
2. Stop comment **before** `</body>`
@lolautruche
Copy link
Contributor Author

Review ping @flovntp @andrerom @bdunogier @dpobel @pspanja

@flovntp
Copy link
Contributor

flovntp commented Nov 3, 2014

+1

@andrerom
Copy link
Contributor

andrerom commented Nov 3, 2014

Didn't we kind of say on the other PR that we don't need to do this as we don't care about layout issues in old browsers when in dev mode? Cause if we did, then I kind of prefer the simpler approach which does not have to mess with buffers (often cause of bugs when buffers are used on several levels for instance).

@lolautruche
Copy link
Contributor Author

Nope, you said:

I think we take it as is or closer to how WebProfiler does it, up to you.

😉

And I think this is safer this way, but I'm no browser expert... @dpobel ?

@lolautruche
Copy link
Contributor Author

In any case, if we apply the same method than WebProfiler (which is the case here), we need to use the buffer since content is directly echoed in compiled Twig templates.

@dpobel
Copy link
Contributor

dpobel commented Nov 3, 2014

anything before the doctype puts IE9 (and below of course...) into the quirks mode which would break how the page is rendered and even if it's only in dev env., I think it's a good thing to try to avoid that :-)

So +1

@andrerom
Copy link
Contributor

andrerom commented Nov 3, 2014

ok, thanks for chiming in @dpobel, then +1

@lolautruche
Copy link
Contributor Author

Thanks, merging.
5.4?

@lolautruche lolautruche merged commit 6fab4be into master Nov 3, 2014
@lolautruche lolautruche deleted the impl_EZP-22858_nameUsedTemplate branch November 3, 2014 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants