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 rendering Twig hook message exception #126

Merged
merged 1 commit into from
Nov 10, 2024

Conversation

loic425
Copy link
Member

@loic425 loic425 commented Nov 7, 2024

Before
image

After
Capture d’écran du 2024-11-07 16-36-56

@loic425 loic425 marked this pull request as draft November 7, 2024 13:44
@loic425 loic425 force-pushed the fix/twig-render-exception branch 2 times, most recently from b02ba01 to 1e88e9e Compare November 7, 2024 15:46
@loic425 loic425 changed the base branch from main to 0.5 November 7, 2024 15:47
@loic425 loic425 force-pushed the fix/twig-render-exception branch from 1e88e9e to 91ad8bb Compare November 7, 2024 15:49
@loic425 loic425 force-pushed the fix/twig-render-exception branch 3 times, most recently from 794bb21 to cc575ae Compare November 7, 2024 16:07
@loic425 loic425 changed the title Improve exceptions and fix HookRenderException Fix rendering Twig hook message exception Nov 7, 2024
@loic425 loic425 force-pushed the fix/twig-render-exception branch from cc575ae to 7c176fe Compare November 7, 2024 16:08
@loic425 loic425 marked this pull request as ready for review November 7, 2024 16:09
Prometee
Prometee previously approved these changes 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) {
Copy link
Member Author

@loic425 loic425 Nov 7, 2024

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 GSadee merged commit 5444413 into Sylius:0.5 Nov 10, 2024
6 checks passed
@loic425 loic425 deleted the fix/twig-render-exception branch November 15, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants