Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3925

Symfony template override doesn't work on production

$
0
0

I am working on an app written with Symfony 4.4.It uses the EWZRecaptchaBundle to handle captchas.However, this bundle doesn't deal well when there are two captchas on the same page.To address this issue, I had to override its template by creating templates/Bundles/EWZRecaptchaBundle/Form/ewz_recaptcha_widget.html.twig

In my local dev environment (Symfony Server) this works fine.debug:twig shows Symfony detecting both template locations (the original bundle and my override)

symfony console debug:twig...@EWZRecaptcha               templates/bundles/EWZRecaptchaBundle/                            vendor/excelwebzone/recaptcha-bundle/src/Resources/views/@!EWZRecaptcha              vendor/excelwebzone/recaptcha-bundle/src/Resources/views/...

But, in production I still get the template from the original bundle, not my override.

bin/console --env=prod debug:twig...@EWZRecaptcha               vendor/excelwebzone/recaptcha-bundle/src/Resources/views/@!EWZRecaptcha              vendor/excelwebzone/recaptcha-bundle/src/Resources/views/...

I would expect my template override to be used in production, as it is in dev.

I have tried clearing the cache.


Viewing all articles
Browse latest Browse all 3925

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>