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 errors happening on error template rendering #5315

Merged
merged 1 commit into from
Jun 3, 2020
Merged

Fix errors happening on error template rendering #5315

merged 1 commit into from
Jun 3, 2020

Conversation

plozmun
Copy link
Contributor

@plozmun plozmun commented Jun 2, 2020

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets fixes #5314
Related issues/PRs
License MIT
Documentation PR -

What's in this PR?

Fix for #5314

@plozmun plozmun changed the title [WebsiteBundle] StatusCode Exception [ErrorController] StatusCode Exception && check if template exists Jun 2, 2020
@plozmun
Copy link
Contributor Author

plozmun commented Jun 2, 2020

Seems that there is a BC Breaks with Twig 1.0 because exists was introduced in 2.0 😞

@alexander-schranz
Copy link
Member

@plozmun The exists method exist in the required twig function its just not part of the interface as it was introduced in a later 1.x version. You need to create your mock from FilesystemLoader like in the ExceptionControllerTest

@alexander-schranz
Copy link
Member

@danrot looks like flow is currently failing on the 2.1 branch since we merged 2.0 branch back to 2.1.

@alexander-schranz alexander-schranz added the Bug Error or unexpected behavior of already existing functionality label Jun 2, 2020
@alexander-schranz alexander-schranz added this to the Release 2.1 milestone Jun 2, 2020
@plozmun
Copy link
Contributor Author

plozmun commented Jun 2, 2020

@alexander-schranz i have added a test to add some coverage and Download languages test fails now but i don't know if it's related. 🤔

Check if template exists

Fix tests

fix CS

Fix interface

Remove not used loader

Change LoaderInterface by FilesystemLoader

add coverage to not existing template
@danrot danrot changed the title [ErrorController] StatusCode Exception && check if template exists Fix errors happening on error template rendering Jun 3, 2020
@danrot danrot mentioned this pull request Jun 3, 2020
@danrot
Copy link
Contributor

danrot commented Jun 3, 2020

@alexander-schranz Fixed that in #5319

@alexander-schranz alexander-schranz merged commit cdc8fd8 into sulu:release/2.1 Jun 3, 2020
@alexander-schranz
Copy link
Member

@plozmun Thank you for this fixes 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Error or unexpected behavior of already existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants