-
Notifications
You must be signed in to change notification settings - Fork 12
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 rendering Twig hook message exception #126
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b02ba01
to
1e88e9e
Compare
1e88e9e
to
91ad8bb
Compare
Prometee
requested changes
Nov 7, 2024
src/TwigHooks/src/Hookable/Renderer/HookableTemplateRenderer.php
Outdated
Show resolved
Hide resolved
794bb21
to
cc575ae
Compare
cc575ae
to
7c176fe
Compare
Prometee
previously approved these changes
Nov 7, 2024
7c176fe
to
fb7deeb
Compare
Prometee
approved these changes
Nov 7, 2024
loic425
commented
Nov 7, 2024
@@ -42,12 +42,15 @@ public function render(AbstractHookable $hookable, HookableMetadata $metadata): | |||
return $this->twig->render($hookable->template, [ | |||
HooksRuntime::HOOKABLE_METADATA => $metadata, | |||
]); | |||
} catch (HookRenderException $exception) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we do not catch this one, it will append the message with the parent template.
GSadee
approved these changes
Nov 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before
![image](https://private-user-images.githubusercontent.com/8329789/383983475-26e099cc-92b6-46ff-a10c-e320bdfd5356.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4NDQ0MzcsIm5iZiI6MTczOTg0NDEzNywicGF0aCI6Ii84MzI5Nzg5LzM4Mzk4MzQ3NS0yNmUwOTljYy05MmI2LTQ2ZmYtYTEwYy1lMzIwYmRmZDUzNTYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMThUMDIwMjE3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZmJlZmM0M2IwODE2MGQxM2NmNjE2ZDUwODI5OWNmYjUyNWUwMTBjODk4ZDY3YzI2ODgwM2FkNWJlNjM5NTdmNCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.dqekYhHiCATUuT55a0FmWYhWMGne3l3EJ4Z6Elt0oJw)
After
![Capture d’écran du 2024-11-07 16-36-56](https://private-user-images.githubusercontent.com/8329789/384032436-879e49b3-9029-4ed9-be76-f5a57e2b42db.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4NDQ0MzcsIm5iZiI6MTczOTg0NDEzNywicGF0aCI6Ii84MzI5Nzg5LzM4NDAzMjQzNi04NzllNDliMy05MDI5LTRlZDktYmU3Ni1mNWE1N2UyYjQyZGIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMThUMDIwMjE3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDI5NWFiMDJkMzM2MDNlNWY1YjlhYjBlNTQ3NGEyODE3ZDZhMzE3YWY0MDg4Mjg3MWFkODczMjFmMDA3MmRjNiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.94_UTVDNuu85a7KntgqjUM7sFEQxAITzlgrx4mxEN7g)