# Mautic 2.0 Preview form error log

**URL:** https://forum.mautic.org/t/mautic-2-0-preview-form-error-log/3920
**Category:** Product Support
**Created:** [July 6, 2016, 10:09pm UTC](https://forum.mautic.org/t/mautic-2-0-preview-form-error-log/3920 "2016-07-06T22:09:22Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![eduardo](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@eduardo](https://forum.mautic.org/u/eduardo)
#### Post date: [July 6, 2016, 10:09pm UTC](https://forum.mautic.org/t/mautic-2-0-preview-form-error-log/3920/1 "2016-07-06T22:09:22Z")

</div>

So I tried to preview a campaing form on the mautic UI which prompted to a new site with this error logs  
  
Does anyone have the same error?  
  
Warning: include(/home/user/mautic/vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php): failed to open stream: No such file or directory in /home/user/mautic/vendor/composer/ClassLoader.php on line 412  
  
  
  
Warning: include(): Failed opening ‘/home/user/mautic/vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php’ for inclusion (include\_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/padron5/mautic/vendor/composer/ClassLoader.php on line 412  
  
  
  
Fatal error: Class ‘Twig\_Node\_Expression\_Test\_Defined’ not found in /home/user/mautic/app/cache/prod/classes.php on line 6705

---

<div class="post-metadata">

### Author: ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)
#### Post date: [July 8, 2016, 10:25am UTC](https://forum.mautic.org/t/mautic-2-0-preview-form-error-log/3920/2 "2016-07-08T10:25:07Z")

</div>

This issue was already reported at GitHub. Please, let’s discuss this issue there so it’s all in one place:

[https://github.com/mautic/mautic/issues/1983#issuecomment-231334371](https://github.com/mautic/mautic/issues/1983#issuecomment-231334371)

---

<div class="post-metadata">

### Author: ![ikolubr](https://avatars.discourse-cdn.com/v4/letter/i/aca169/32.png) [@ikolubr](https://forum.mautic.org/u/ikolubr)
#### Post date: [July 8, 2016, 12:39am UTC](https://forum.mautic.org/t/mautic-2-0-preview-form-error-log/3920/3 "2016-07-08T00:39:15Z")

</div>

Almost same issue here.  
Before:

```auto
error] 1258#1258: *390 FastCGI sent in stderr: "PHP message: PHP Fatal error: Class 'Twig_Node_Expression_Test_Defined' not found in /var/www/.../htdocs/vendor/twig/twig/lib/Twig/Extension/Core.php on line 298" while reading response header from upstream, client: ..., server: ..., request: "POST /form/submit?formId=2 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: ...
```

Now:

```auto
[error] 1258#1258: *694 FastCGI sent in stderr: "PHP message: PHP Fatal error: Class 'Twig_Node_Expression_Test_Defined' not found in /var/www/.../htdocs/app/cache/prod/classes.php on line 6705" while reading response header from upstream, client: ..., server: ..., request: "POST /form/submit?formId=2 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: ...
```

Already tried clearing cache…

---

<div class="post-metadata">

### Author: ![eduardo](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@eduardo](https://forum.mautic.org/u/eduardo)
#### Post date: [July 6, 2016, 10:09pm UTC](https://forum.mautic.org/t/mautic-2-0-preview-form-error-log/3920/4 "2016-07-06T22:09:22Z")

</div>

So I tried to preview a campaing form on the mautic UI which prompted to a new site with this error logs  
Does anyone have the same error?  
Warning: include(/home/user/mautic/vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php): failed to open stream: No such file or directory in /home/user/mautic/vendor/composer/ClassLoader.php on line 412

Warning: include(): Failed opening ‘/home/user/mautic/vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php’ for inclusion (include\_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/padron5/mautic/vendor/composer/ClassLoader.php on line 412

Fatal error: Class ‘Twig\_Node\_Expression\_Test\_Defined’ not found in /home/user/mautic/app/cache/prod/classes.php on line 6705

---

<div class="post-metadata">

### Author: ![JustinT](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/justint/32/89_2.png) [@JustinT](https://forum.mautic.org/u/JustinT)
#### Post date: [July 6, 2016, 10:29pm UTC](https://forum.mautic.org/t/mautic-2-0-preview-form-error-log/3920/5 "2016-07-06T22:29:45Z")

</div>

I have been seeing this error on a few other actions as well. I see it when trying to use the landing page builder and when trying to clear my cache. It also appears several times in my apache logs. I was getting this error when using a custom theme but I fixed a couple of syntax issues and the error went away, no idea what is actually causing it though.

_Edit_  
I have included the message I get when clearing my cache:

[quote]  
PHP Warning: include(): Failed opening ‘/var/www/html/vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php’ for inclusion (include\_path=’.:/usr/share/php’) in /var/www/html/vendor/composer/ClassLoader.php on line 412

[SymfonyComponentDebugExceptionClassNotFoundException]  
Attempted to load class “Twig\_Node\_Expression\_Test\_Defined” from the global namespace.  
Did you forget a “use” statement?[/quote]
