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

Error after some updates #31

Open
sdousley opened this issue Dec 13, 2017 · 18 comments
Open

Error after some updates #31

sdousley opened this issue Dec 13, 2017 · 18 comments

Comments

@sdousley
Copy link

I performed some updates to my code, and all works perfectly fine in my development environment, but when I pushed it out onto my production environment, I'm seeing the below error:

Unable to load the "Symfony\Component\Form\FormRenderer" runtime in "bootstrap_3_layout.html.twig". (View: /path/to/view.blade.php) (View: /path/to/view.blade.php)

Any ideas why this might be? PHP versions between live and dev are the same, all be it dev is run on centos, where live is on gentoo.

Looks like it's being thrown in vendor/twig/twig/lib/Twig/Environment.php:663.

@sailingdeveloper
Copy link
Contributor

#metoo

@sdousley
Copy link
Author

for now (since I don't need them) I've got round this issue by removing all my @Form($form) calls. I'll keep hunting round and see what I can find to try and resolve this.

@sailingdeveloper
Copy link
Contributor

@sdousley and replacing them with ... ?

@sdousley
Copy link
Author

nothing at present. literally just commenting them out in the blade template

@sailingdeveloper
Copy link
Contributor

Well, that would work of course, but I kind of need those forms 😅

@sdousley
Copy link
Author

Yeah, mine fortunately aren't 100% necesary for my system, just ways to request stuff (it's a personal site anyway).

@sdousley
Copy link
Author

hmmm, for some reason, on my local environment, where it works, it's wanting to load Symfony\Bridge\Twig\Form\TwigRenderer, but on live, it's the Symfony\Component\Form\FormRenderer

@barryvdh
Copy link
Owner

barryvdh commented Jan 8, 2018

Does it work with above patch? Try 0.4.x@dev

@sdousley
Copy link
Author

sdousley commented Jan 8, 2018

Just tested - and now getting a different error:

Target [Twig_LoaderInterface] is not instantiable while building [Barryvdh\Form\FormRenderer, Twig_Environment]. (View: <my_views>/menu.blade.php) (View: <my_views>/menu.blade.php)

@barryvdh
Copy link
Owner

barryvdh commented Jan 8, 2018

Are you using twig or without twig?

@sdousley
Copy link
Author

sdousley commented Jan 8, 2018

I'm just doing it all in blade templates - I haven't (knowingly) used twig

@barryvdh
Copy link
Owner

barryvdh commented Jan 8, 2018

Okay, please try 38c09be

@sdousley
Copy link
Author

sdousley commented Jan 8, 2018

OK, whilst the previous version stopped working on my dev environment - making testing easier, this issue has now flagged up a new issue - "Template "bootstrap_3_layout.html.twig" is not defined. "

This happens on dev and live.

@sdousley
Copy link
Author

sdousley commented Jan 9, 2018

OK, so I added SymfonyFormProvider to my list of providers, and added the resources/views/form directory, now I'm getting

Target [Symfony\Bridge\Twig\Form\TwigRendererEngineInterface] is not instantiable while building [Symfony\Bridge\Twig\Form\TwigRenderer].

@barryvdh barryvdh reopened this Jan 10, 2018
@sdousley
Copy link
Author

I've just tested this on completely fresh Laravel 5.5 and 5.4 (using v0.3.7) and both still get this error with absolutely no other modifications. Is there any updates on this?

@sdousley
Copy link
Author

OK, I've done a little more investigation on this, and have found that the following package changes allow this package to work:

  • Updating doctrine/inflector (v1.2.0 => v1.1.0): Downloading (100%)
  • Updating erusev/parsedown (1.6.4 => 1.6.1): Downloading (100%)
  • Updating league/flysystem (1.0.41 => 1.0.34): Downloading (100%)
  • Updating monolog/monolog (1.23.0 => 1.22.0): Downloading (100%)
  • Updating mtdowling/cron-expression (v1.2.1 => v1.2.0): Downloading (100%)
  • Updating paragonie/random_compat (v2.0.11 => v2.0.4): Downloading (100%)
  • Updating ramsey/uuid (3.7.1 => 3.5.2): Downloading (100%)
  • Updating swiftmailer/swiftmailer (v6.0.2 => v5.4.5): Downloading (100%)
  • Updating symfony/polyfill-mbstring (v1.6.0 => v1.3.0): Downloading (100%)
  • Updating symfony/debug (v3.4.0 => v3.2.3): Downloading (100%)
  • Updating symfony/console (v3.4.0 => v3.2.3): Downloading (100%)
  • Updating symfony/css-selector (v3.4.0 => v3.1.10): Downloading (100%)
  • Updating symfony/finder (v3.4.0 => v3.2.3): Downloading (100%)
  • Updating symfony/http-foundation (v3.4.0 => v3.2.3): Downloading (100%)
  • Updating symfony/event-dispatcher (v4.0.0 => v3.2.3): Downloading (100%)
  • Updating symfony/http-kernel (v3.4.0 => v3.2.3): Downloading (100%)
  • Updating symfony/options-resolver (v4.0.0 => v3.2.3): Downloading (100%)
  • Updating symfony/polyfill-intl-icu (v1.6.0 => v1.3.0): Downloading (100%)
  • Updating symfony/intl (v4.0.0 => v3.2.3): Downloading (100%)
  • Updating symfony/process (v3.4.0 => v3.2.3): Downloading (100%)
  • Updating symfony/polyfill-php70 (v1.6.0 => v1.3.0): Downloading (100%)
  • Updating symfony/inflector (v4.0.0 => v3.2.3): Downloading (100%)
  • Updating symfony/property-access (v4.0.0 => v3.2.3): Downloading (100%)
  • Updating symfony/routing (v3.4.0 => v3.2.3): Downloading (100%)
  • Updating symfony/translation (v3.4.0 => v3.2.3): Downloading (100%)
  • Updating symfony/var-dumper (v3.4.0 => v3.2.3): Downloading (100%)
  • Updating fzaninotto/faker (v1.7.1 => v1.6.0): Downloading (100%)
  • Updating twig/twig (v2.4.4 => v2.1.0): Downloading (100%)
  • Updating symfony/validator (v3.4.0 => v3.2.3): Downloading (100%)
  • Updating symfony/twig-bridge (v3.4.0 => v3.2.3): Downloading (100%)
  • Updating symfony/form (v3.4.0 => v3.2.3): Downloading (100%)
  • Updating laravel/framework (v5.5.22 => v5.4.9): Downloading (100%)
  • Removing barryvdh/laravel-form-bridge (dev-master 38c09be)
  • Installing barryvdh/laravel-form-bridge (dev-master 350b9f6): Downloading (100%)
  • Installing symfony/dom-crawler (v3.1.10): Downloading (100%)

This requires changing to Laravel 5.4, as some of these packages don't work on 5.5 yet, so whilst this doesn't get it working on 5.5, it does mean that we can't use 5.5.

I think the most likely package that means that this can work would be the twig/twig or symfony/twig-bridge downgrade as on the later versions there's a few classes that phpStorm is flagging to me as deprecated

@edwinheij
Copy link

edwinheij commented Mar 5, 2018

Did some digging but still got error "Template "bootstrap_3_layout.html.twig" is not defined. (View: ... )" thrown at vendor/twig/twig/lib/Twig/Loader/Chain.php line 86.

edit: I'm at Laravel 5.6.7

@ghost
Copy link

ghost commented Mar 30, 2018

Any solution? (Laravel 5.6.15)

sadafrangian3 pushed a commit to sadafrangian3/laravel-form-bridge-common that referenced this issue Oct 18, 2022
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

4 participants