Botched update to 3.2.5 - Fatal "Uncaught Twig Loader" Error

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
dandurston
Registered User
Posts: 25
Joined: Fri Dec 12, 2014 2:18 am

Botched update to 3.2.5 - Fatal "Uncaught Twig Loader" Error

Post by dandurston »

Support Request Template
What version of phpBB are you using? phpBB 3.1.5
What is your board's URL? http://motorscooterguide.net/Forum
Who do you host your board with? 1and1.com / Ionos
How did you install your board? I used the download package from phpBB.com
What is the most recent action performed on your board? Update from a previous version of phpBB3
Is registration required to reproduce this issue? No
Do you have any MODs installed? No
Do you have any extensions installed? No
What version of phpBB3 did you update from? phpBB 3.1.5
What styles do you currently have installed? Prosilver/subsilver
What language(s) is your board currently using? English
Which database type/version are you using? MySQL 5
What is your level of experience? New to PHP and phpBB
What actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? Attempting to update from 3.1.5 to 3.2.5
Please describe your problem. I am attempting to update from 3.1.5. to 3.2.5 but I botched the process.

My intent was to:
1) Backup config.php, /files, /styles and /images
2) Upload all the new stuff for 3.2.5 along with the stuff in #1
3) go to ...../install/database_update.php to get it updated.

But I messed up and backed up the config folder, rather than config.php so I ended up overwriting my config.php file. I spent a fair bit of time re-creating that and I think I got it sorted, but in the process I accidentally deleted my styles folder.

So now when I upload a fresh version of 3.2.5. along with my config.php, and two old folders (files, images) and then go to mysite.com/Forum/install/database_update.php it gives me a 404. Maybe I am making a simple mistake here?

When I try go to mysite.com/Forum/install and try to do a regular install. I go to the install tab, and set up an admin username and type in all the database info from my recreated config.php file. But it says the tables already exist. If I change the table prefix to something else it lets me continue and get the board set up, but then none of my old content is there. So I upload my old config.php file with the correct tables prefix and then the board just breaks. I get a fatal error that says "Uncaught_Twig_Error_Loader" and then it says it can't find a bunch of files that all all related the styles template it seems.

Is anyone able to advise how I might be my forum back up and running? Thanks!
Generated by SRT Generator
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53412
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Botched update to 3.2.5 - Fatal "Uncaught Twig Loader" Error

Post by Brf »

There is no "database_update.php" in phpBB 3.2.
You should be going to the Update tab of the installer and select the "Update database only" link..
dandurston
Registered User
Posts: 25
Joined: Fri Dec 12, 2014 2:18 am

Re: Botched update to 3.2.5 - Fatal "Uncaught Twig Loader" Error

Post by dandurston »

Hmmm.....there is no update tab in my installer. When I go to mysite.com/Forum/install I get this:
Screen Shot 2019-01-21 at 1.57.05 PM.png
User avatar
warmweer
Jr. Extension Validator
Posts: 11274
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Botched update to 3.2.5 - Fatal "Uncaught Twig Loader" Error

Post by warmweer »

dandurston wrote: Mon Jan 21, 2019 8:58 pm Hmmm.....there is no update tab in my installer. When I go to mysite.com/Forum/install I get this:
Your config.php is empty!!

and in 3.2.x the correct way to update = /install/app.php
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
dandurston
Registered User
Posts: 25
Joined: Fri Dec 12, 2014 2:18 am

Re: Botched update to 3.2.5 - Fatal "Uncaught Twig Loader" Error

Post by dandurston »

Ahh I see - I was trying to do the install/update and then replace the config.php with my old one.

I just uploaded the old one and now there is an update tab. I just did an update database only, so not updating the file system. That worked:
Screen Shot 2019-01-21 at 2.26.23 PM.png
But then when I click the link to take me to the ACP it's just blank. Maybe this is because I lost my old styles folder? Or do I need to delete the install folder for that to work? On my forum I had changed the template and made a few tweaks to it, but I'm happy just getting this working and then redo'ing the style from there.

Right now when I got to the main forum page I still get a Fatal Twig Loading error.
Screen Shot 2019-01-21 at 2.31.01 PM.png
User avatar
warmweer
Jr. Extension Validator
Posts: 11274
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Botched update to 3.2.5 - Fatal "Uncaught Twig Loader" Error

Post by warmweer »

dandurston wrote: Mon Jan 21, 2019 9:29 pm Ahh I see - I was trying to do the install/update and then replace the config.php with my old one.

I just uploaded the old one and now there is an update tab. I just did an update database only, so not updating the file system. That worked:Screen Shot 2019-01-21 at 2.26.23 PM.png

But then when I click the link to take me to the ACP it's just blank. Maybe this is because I lost my old styles folder? Or do I need to delete the install folder for that to work? On my forum I had changed the template and made a few tweaks to it, but I'm happy just getting this working and then redo'ing the style from there.

Right now when I got to the main forum page I still get a Fatal Twig Loading error.

Screen Shot 2019-01-21 at 2.31.01 PM.png
First of all, when updating or upgrading, prosilver is always updated together with the files. So prosilver should be the active style, and default. If subsilver was your default style, that would be a/the reason for the errors.

Secondly, you can't really do a database update without having done a file update. Files are best updated using the full package (or the files packages), NOT the autoupdate, unless you have file modifications which you want to transfer automatically - BUT there is no guarantee that a modification will continue to work, PLUS the autoupdate relies very heavily on file writing permissions.

The system is straightforward:
(in short)
- replacing the fileset (read the instructions and take care not to overwrite your config php).
- doing the database update (and you need the config.php for that).
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
dandurston
Registered User
Posts: 25
Joined: Fri Dec 12, 2014 2:18 am

Re: Botched update to 3.2.5 - Fatal "Uncaught Twig Loader" Error

Post by dandurston »

I think I'm doing this right now, but it still not working. I am:
1) Adding a fresh copy of 3.2.5.
2) Adding my old config.php file, /files and /images
3) Go to http://www.motorscooterguide.net/Forum/ ... php/update

Here I can do a database update, but the option to update the files is not present. If I only update the database then the site doesn't load or gives a Twig Loader Error. So I think I need to update the files, but for some reason it won't let me.

Could this possibly be a problem with my config.php file? It works to do a database update, but I did have to reconstruct it after accidentally deleting it as previously described.

Thanks for any help you can provide! It is much appreciated. I am trying to run this forum but not good at it.
Screen Shot 2019-01-22 at 8.55.05 PM.png
User avatar
warmweer
Jr. Extension Validator
Posts: 11274
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Botched update to 3.2.5 - Fatal "Uncaught Twig Loader" Error

Post by warmweer »

dandurston wrote: Wed Jan 23, 2019 3:58 am
Here I can do a database update, but the option to update the files is not present. If I only update the database then the site doesn't load or gives a Twig Loader Error. So I think I need to update the files, but for some reason it won't let me.
You have updated the files: see your 1)
The screenshot doesn't tell you that you have to update your files. It says to make sure the relevant files were uploaded (which is your step 1)

You didn't really descrine the update method you used in full.
Did you follow 4.i. Full package ?
BTW 4.ii. is basically the same but with replacing only the changed files.
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
dandurston
Registered User
Posts: 25
Joined: Fri Dec 12, 2014 2:18 am

Re: Botched update to 3.2.5 - Fatal "Uncaught Twig Loader" Error

Post by dandurston »

I tried to update via method 5 in that support page you linked to because I am updating from 3.1.x, rather than 3.2.x:
Screen Shot 2019-01-23 at 8.33.53 PM.png
That method is very similar, but says to keep a few more things (/ext and /store).

The basic process I am attempting is to backup those items, delete all the files, upload a fresh copy of 3.2.5, re-upload those items, and then do an update via ..../install/app.php/update.

I think the problem is that I messed up the backup of these items. I backed up the config folder rather than config.php, and I missed backing up the /store folder because I was initially working from a different set of instructions initially which didn't mention this.

I have rebuilt my config.php and I think it is correct (when I update my database it says it 100% worked). So I think I have everything I need except for the /store folder. I'm not sure if that is essential or not.

When I navigate to ..../install/app.php/update I get this message saying no valid update directory was found:
Screen Shot 2019-01-23 at 9.04.10 PM.png
If I update anyways, it appears to work. It only takes a few seconds and says 100% successful:
Screen Shot 2019-01-23 at 9.04.18 PM.png
But then when I click on "Take me to the ACP" I just end up at a blank webpage. I delete the /install folder and re-load but the ACP page is still blank. When I try going to the main forum page, I get a "Fatal Twig Error"
Screen Shot 2019-01-23 at 9.07.10 PM.png
So it seems like my problem is either:
1 My rebuilt config.php file isn't right, or
2) The missing /store folder is causing this.

Can anyone advise on which it may be and how I can proceed from here? Much thanks.
User avatar
Lumpy Burgertushie
Registered User
Posts: 69224
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Botched update to 3.2.5 - Fatal "Uncaught Twig Loader" Error

Post by Lumpy Burgertushie »

in the first place, the store folder should not be missing. no matter which set of instructions you follow the store folder should be there when you are finished with them.

a blank page usually means a php error. check the errors logs at your hosting control panel to see what is causing it.
when you find the logs, post the latest 25 or so lines here so we can see them.

robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
warmweer
Jr. Extension Validator
Posts: 11274
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Botched update to 3.2.5 - Fatal "Uncaught Twig Loader" Error

Post by warmweer »

dandurston wrote: Thu Jan 24, 2019 4:08 am So it seems like my problem is either:
1 My rebuilt config.php file isn't right, or
2) The missing /store folder is causing this.

Can anyone advise on which it may be and how I can proceed from here? Much thanks.
There may be another reason;
dandurston wrote: Mon Jan 21, 2019 5:18 pm What styles do you currently have installed? Prosilver/subsilver
One of the first error messages is: can't find message_body.html in styles/all/template.
Which style is default and what is prosilver's style_id?
This, because you wrote subsilver (perhaps you meant subsilver2) and, depending on how old your board is, prosilver could have style_id =2.
Should that be the case then a simple edit might solve the problem: editing prosilver's style id to 1, setting is as the only active style and overrriding user_style (best remove subsilver).

As usual, make sure you keep the original backup and only edit after you have doublechecked and confirmed that
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
dandurston
Registered User
Posts: 25
Joined: Fri Dec 12, 2014 2:18 am

Re: Botched update to 3.2.5 - Fatal "Uncaught Twig Loader" Error

Post by dandurston »

I think you may be on the root problem warmweer. I set up the styles about 7-10 years ago, so my memory is fuzzy but I did change the default style away from the default to something else. One style was subsilver (or subsilver2) and the other was prosilver. I forget which is which.

Are you able to advise on where I go to check/change the style_id?
User avatar
janus_zonstraal
Registered User
Posts: 6427
Joined: Sat Aug 30, 2014 1:30 pm

Re: Botched update to 3.2.5 - Fatal "Uncaught Twig Loader" Error

Post by janus_zonstraal »

You can have a look into the database
_styles` table
Sorry! My English is bat ;) !!!
dandurston
Registered User
Posts: 25
Joined: Fri Dec 12, 2014 2:18 am

Re: Botched update to 3.2.5 - Fatal "Uncaught Twig Loader" Error

Post by dandurston »

Thanks everyone for your help thus far.

I am still struggling with this and getting the same error. I would like to check the styles in the database, because I think my deleted styles folder is the problem so hopefully I can adjust it to use the default style ("prosilver") in 3.2.5.

Is anyone able to advise me on how I might check/change my database? When I log in and go to my database I get to the panel below, but I'm not familiar with mySQl so I don't know how to proceed further. Thank for any help you're able to provide. It is much appreciated. I'm getting messages from users on my forum wondering why it's down, and I don't know how to resolve this.

Thanks!
Screen Shot 2019-02-03 at 4.26.38 PM.png
User avatar
Lumpy Burgertushie
Registered User
Posts: 69224
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Botched update to 3.2.5 - Fatal "Uncaught Twig Loader" Error

Post by Lumpy Burgertushie »

on the left menu, you click on that plus sign (+) next to the database name/numbre.
that will expand the list of tables in that database.

all of this is assuming that you are in the right place for your phpbb database.

once you see the list of tables, find the one named phpbb_styles the prefix may be different for your tables )

it will probably be on the second page of tables, there should be a drop down for pages.

once you see it, click on it and in the right window will be all the columns etc. of that table.

now, not sure what you want to do in there but always make a backup before you make any changes. even the slightest mistake can crater yuour board.

before you do anything else, if you have deleted the styles folder, put it back, make sure prosilver is in that folder and nothing else.

then test.

if it still does not work try making sure the in that styles table prosilver is set as style id of 1 and style active is set to 1
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
Post Reply

Return to “[3.2.x] Support Forum”