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

An exception has been thrown during the rendering of a template ("Warning: Undefined array key "_builder""). #121

Open
seyfcom opened this issue Nov 26, 2024 · 1 comment · May be fixed by #125

Comments

@seyfcom
Copy link

seyfcom commented Nov 26, 2024

When I try to use the {{ gotenberg_asset('public/...') }} I get this error

An exception has been thrown during the rendering of a template ("Warning: Undefined array key "_builder"").

I have no idea what to do. I just installed the bundle, it works with url, i tried with html, works without assets, now breaks when loading assets.
Any help ?
Symfony 6.4.15, and latest gotenberg bundle

@StevenRenaux
Copy link
Collaborator

StevenRenaux commented Nov 29, 2024

Hi, could you provide more context? or code?
I tried to reproduce but I don't get the same exception.

To help you out, first, have you configured assets_directory in your configuration file?
By default, the assets are fetched from the assets folder.

Documentation on assets
Documentation on configuration

If you haven't set this up, you can fetch an image located in the public folder by doing this directly in your Twig template.

<img src="{{ gotenberg_asset('../public/img/logo.png') }}"/>

You can also check out this repository for an example implementation.

@Jean-Beru Jean-Beru linked a pull request Dec 12, 2024 that will close this issue
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 a pull request may close this issue.

2 participants