Uncaught exception 'Twig_Error_Loader' with message 'Unable to find template

For support and discussion related to templates, themes, and imagesets in phpBB 3.1.
Ideas Centre
Locked
Slechtvalk
Registered User
Posts: 34
Joined: Tue Jan 15, 2008 12:56 pm

Uncaught exception 'Twig_Error_Loader' with message 'Unable to find template

Post by Slechtvalk » Mon Feb 23, 2015 6:42 am

Good Morning,

under 3.0.x i made 3 custom sites.
Now with 3.1.3 these sites wont work anymore.

Update process to 3.1.x

First i updated without errors to 3.0.13
I uninstalled every mod with that "modission cleaner" i found here in the forum.
I deleted everything beside
config.php
files
images
store

During update i had an error with phpbb_modules ACP_CAT_STYLES which could not be found.
I created it manually in the database, update process now worked. I made a clean install in another directory after i recognized ACP is not looking like intended. I copied the phpbb_modules form the clean install into the forum, everything works, no errors anymore, no strange behavior of the forum.

in phpbb/hangar/ are the 3 custom sites.
I copied the mech.html into phpbb/styles/prosilver/template

When i now open one of the custom sites i get this error

Code: Select all


( ! ) Fatal error: Uncaught exception 'Twig_Error_Loader' with message 'Unable to find template "mech.html" (looked into: ../styles/prosilver/template, ../styles/prosilver/theme).' in /var/www/blutigetempler/forum/vendor/twig/twig/lib/Twig/Loader/Filesystem.php on line 202
( ! ) Twig_Error_Loader: Unable to find template "mech.html" (looked into: ../styles/prosilver/template, ../styles/prosilver/theme). in /var/www/blutigetempler/forum/vendor/twig/twig/lib/Twig/Loader/Filesystem.php on line 202
Call Stack
#	Time	Memory	Function	Location
1	0.0073	250400	{main}( )	../mech.php:0
2	4.4661	10981488	page_footer( )	../mech.php:111
3	4.5680	11463656	phpbb\template\twig\twig->display( )	../functions.php:5311
4	4.5711	11487992	Twig_Environment->display( )	../twig.php:332
5	4.5711	11488040	phpbb\template\twig\environment->loadTemplate( )	../Environment.php:299

I read about the custom site changes, but it looks like everything is fine.
In these custom sites i use the login, the redirect to login if not logged in, collect user id and run mysql on selfmade tables in combination with the collected user_id.
my code should work even with the 3.1.x database, phpbb_users and phpbb_usergroup contain the fields like in 3.0.x

The not found files are there, cache deleted several times.

Anyone an idea? Thank you!

User avatar
Arty
Former Team Member
Posts: 16654
Joined: Wed Mar 06, 2002 2:36 pm
Name: Vjacheslav Trushkin
Contact:

Re: Uncaught exception 'Twig_Error_Loader' with message 'Unable to find template

Post by Arty » Mon Feb 23, 2015 8:06 am

From error message:
Unable to find template "mech.html"
There is no such template in phpBB, so ether some extension requires it or some template is including it.
Vjacheslav Trushkin / Arty.
Free phpBB 3.1 styles | New project: Iconify - modern SVG framework

rxu
Extensions Development Team
Posts: 3004
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: Uncaught exception 'Twig_Error_Loader' with message 'Unable to find template

Post by rxu » Mon Feb 23, 2015 8:10 am

Slechtvalk
I guess this is something that you've created some time ago viewtopic.php?f=71&t=2250786 ;)

Slechtvalk
Registered User
Posts: 34
Joined: Tue Jan 15, 2008 12:56 pm

Re: Uncaught exception 'Twig_Error_Loader' with message 'Unable to find template

Post by Slechtvalk » Mon Feb 23, 2015 9:38 am

As i wrote above,
Mech.html is added manually into The template folder.

I dont Understand Why it is not found, its physically there, THE tutorial between creating custom Sites in 3.0.x and 3.1.x Show no change which would cause that.

User avatar
david63
Registered User
Posts: 16840
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Uncaught exception 'Twig_Error_Loader' with message 'Unable to find template

Post by david63 » Mon Feb 23, 2015 10:52 am

Slechtvalk wrote:I dont Understand Why it is not found, its physically there
Styles for 3.0.x do not work on 3.1.x
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

Slechtvalk
Registered User
Posts: 34
Joined: Tue Jan 15, 2008 12:56 pm

Re: Uncaught exception 'Twig_Error_Loader' with message 'Unable to find template

Post by Slechtvalk » Mon Feb 23, 2015 11:49 am

Yes, i know, but i am only doing
Including Overall Header
Template->assign vars with 1 Variable
Inclusive Overall footer.

So i think there might be a Change in
Template-> assign vars.

Slechtvalk
Registered User
Posts: 34
Joined: Tue Jan 15, 2008 12:56 pm

Re: Uncaught exception 'Twig_Error_Loader' with message 'Unable to find template

Post by Slechtvalk » Mon Feb 23, 2015 12:11 pm

Where do i find that for 3.1.x ?

https://wiki.phpbb.com/Tutorial.Template_syntax

User avatar
Arty
Former Team Member
Posts: 16654
Joined: Wed Mar 06, 2002 2:36 pm
Name: Vjacheslav Trushkin
Contact:

Re: Uncaught exception 'Twig_Error_Loader' with message 'Unable to find template

Post by Arty » Mon Feb 23, 2015 1:04 pm

Syntax is almost the same.
Vjacheslav Trushkin / Arty.
Free phpBB 3.1 styles | New project: Iconify - modern SVG framework

Slechtvalk
Registered User
Posts: 34
Joined: Tue Jan 15, 2008 12:56 pm

Re: Uncaught exception 'Twig_Error_Loader' with message 'Unable to find template

Post by Slechtvalk » Mon Feb 23, 2015 4:50 pm

OK, im getting closer, after several browser refreshes, cache deleting that error is gone.

Code: Select all

<!-- IF S_GROUP_145 -->
S_Group does not exist anymore in 3.1???

https://wiki.phpbb.com/Category:Template_Variables

Thats the last thing missing.

User avatar
Lumpy Burgertushie
Registered User
Posts: 66928
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Uncaught exception 'Twig_Error_Loader' with message 'Unable to find template

Post by Lumpy Burgertushie » Mon Feb 23, 2015 5:12 pm

you have to create the group switch just like you did in 3.0

I don't know if there is a extension for that yet but you can check in the extension forums to see.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
Arty
Former Team Member
Posts: 16654
Joined: Wed Mar 06, 2002 2:36 pm
Name: Vjacheslav Trushkin
Contact:

Re: Uncaught exception 'Twig_Error_Loader' with message 'Unable to find template

Post by Arty » Mon Feb 23, 2015 5:34 pm

That template variable never existed in 3.0, you've added it with custom code. Try adding similar custom code to 3.1.
Vjacheslav Trushkin / Arty.
Free phpBB 3.1 styles | New project: Iconify - modern SVG framework

Slechtvalk
Registered User
Posts: 34
Joined: Tue Jan 15, 2008 12:56 pm

Re: Uncaught exception 'Twig_Error_Loader' with message 'Unable to find template

Post by Slechtvalk » Mon Feb 23, 2015 6:40 pm

Oh my, that was custom, well that would explain why it wont work ^^

Thank you very much. Reading the new template guidelines seems to let me do a complete overwork :?

Locked

Return to “[3.1.x] Styles Support & Discussion”