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

Errors with 1.1.0 #13

Closed
gmclelland opened this issue Mar 20, 2018 · 10 comments
Closed

Errors with 1.1.0 #13

gmclelland opened this issue Mar 20, 2018 · 10 comments

Comments

@gmclelland
Copy link
Contributor

Hi @wanze,

Just wanted to let you know that I tried upgrading to the latest version, but I'm getting the following error:

Exception: An exception has been thrown during the compilation of a template ("Object of class Twig_Source could not be converted to string") in {}. (in /Users/glenn/websites/mywebsite/wwwroot/site/assets/cache/FileCompiler/site/modules/TemplateEngineTwig/TemplateEngineTwig.module line 94)

error

I tried refreshing the modules and clearing compiled files from the admin. Is there anything else I need to do or try?

I'm running php 7.1. I also have the latest version TemplateEngineFactory installed. I'm running Processwire 3.0.96

@wanze
Copy link
Owner

wanze commented Mar 20, 2018

Hi @gmclelland

Strange, I'm not seeing this issue here, also on PHP 7.1 and ProcessWire 3.0.96. I also replaced the module on a larger site of mine and it worked fine.

  • How did you update the module, via composer or the ProcessWire-way by downloading and replacing the module?
  • To be sure: Can you clear the assets/cache directory containing the compiled twig templates and the FileCompiler stuff?

If clearing the caches does not work, I need to take a closer look how this exception is possible.

Thanks for reporting!

@gmclelland
Copy link
Contributor Author

How did you update the module, via composer or the ProcessWire-way by downloading and replacing the module?

  • I use the ProcessWireUpgrade to upgrade the site and ProcessModuleToolkit to upgrade the modules. I will try to manually download from github and replace the module and see if that works.

To be sure: Can you clear the assets/cache directory containing the compiled twig templates and the FileCompiler stuff?

  • I deleted all the files/folders under assets/cache/FileCompiler

I'm still seeing the same error on the website. I'll try upgrading another website as well to see if it is isolated to that site.

@wanze
Copy link
Owner

wanze commented Mar 20, 2018

I deleted all the files/folders under assets/cache/FileCompiler

Could you delete everything in there, especially the TemplateEngineTwig_compile folder. Although I also have the feeling that the problem is related to the ProcessWire's FileCompiler...

@gmclelland
Copy link
Contributor Author

Could you delete everything in there?... I just deleted everything under assets/cache/

I tried downloading the module from github and installing. I then cleared the Modules>Refresh and clear compiled files. Checked the site and still see the same error.

@gmclelland
Copy link
Contributor Author

I just tested on another local website and received the same error.

@gmclelland
Copy link
Contributor Author

Okay. I think I found the problem. I also had the TwigExtensions module(https://processwire.com/talk/topic/15770-twig-extensions/) installed. I uninstalled that module and the site started working again.

I'm not sure yet why I see the error?

@wanze
Copy link
Owner

wanze commented Mar 20, 2018

Oh good catch! I wasn't aware of this module. :) Could you open the issue there?

I'm not sure yet why I see the error?

Most likely the API of twig changed between the previous and current used version and this module is doing something which is no longer compatible.

@gmclelland
Copy link
Contributor Author

Thank you, will do.

@gmclelland
Copy link
Contributor Author

@gmclelland
Copy link
Contributor Author

Closing this issue. I was able to fix the errors in the TwigExtensions module. See this https://processwire.com/talk/topic/15770-twig-extensions/?do=findComment&comment=166188 if interested.

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

2 participants