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

FormBuilder and twig template #21

Closed
mc72 opened this issue Jul 10, 2019 · 3 comments
Closed

FormBuilder and twig template #21

mc72 opened this issue Jul 10, 2019 · 3 comments

Comments

@mc72
Copy link

mc72 commented Jul 10, 2019

Using v2 of twig and latest version of Form Builder pro module. When trying to display the easy embed (Iframe) method on a page, or in the backend, I get an error:

Error: Exception: Unable to find template "form-builder.twig" (looked into: /srv/users/serverpilot/apps/xxappnameremovedxx/public/site/templates/views). (in /srv/users/serverpilot/apps/xxappnameremovedxx/public/vendor/twig/twig/src/Loader/FilesystemLoader.php line 250)

Past versions of twig did not display this error and just displayed the form-builder.php code. I can't exclude the form-builder template in the Factory settings as it is a system template.

@wanze
Copy link
Owner

wanze commented Aug 1, 2019

Hi @mc72

Thanks for the report! I think that the module should not exclude system templates in its configuration. I'll introduce this with the next release. To temporarily solve this problem, you could hook after TemplateEngineFactory::___shouldRenderPage and exclude any pages with the form-builder template from being rendered by Twig.

Here is an example how to setup the hook: https://github.com/wanze/TemplateEngineFactory/blob/master/DOCUMENTATION.md#___shouldrenderpage

Let me know if you need help with the hook or if you solved this in another way.

Cheers

@wanze
Copy link
Owner

wanze commented Sep 28, 2019

Fixed with v2.0.1 - system templates can now be enabled/disabled in the TemplateEngineFactory module configuration.

@wanze wanze closed this as completed Sep 28, 2019
@gmclelland
Copy link
Contributor

Hey @wanze , thanks for fixing this. I just ran into this issue today. For some reason I'm not getting the module update notifications in the Processwire admin when I check for updates? Did you update the modules directory to 2.0.1? It looks like it still shows 1.1.3 for some reason?

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

No branches or pull requests

3 participants