Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: thenakedscientists on January 04, 2018, 05:11:25 PM

Title: Crashed forum - how to revert back to old theme?
Post by: thenakedscientists on January 04, 2018, 05:11:25 PM
Dear community,

I'm desperate and I pray that someone can help me?

I have used SMF for a very long time (over a decade). I have built a very popular site that attracts millions of page views. It's on a bespoke theme based on "Exodus".

However, our server had a problem and has been upgraded to ubuntu 16.04 and php7; now the existing forum won't function and says it has a database error.

Not even repair_settings.php will run. It just gives a white screen, so I fear we have a software incompatibility problem.

I have been a diligent backup person and have twice-daily DB impressions and a complete site backup, but that is useless when I cannot unhook the DB from it's cluster of mods and its theme and revert it to a non-custom theme just to get it working again.

Can anyone help me? I'm so upset for my visitors and users.

Chris

Forum specs:

SMF 2.0.15
Ubuntu 16.04 (now) with PHP7.0, dedicated server; rest of website works fine - https://www.thenakedscientists.com/

Title: Re: Crashed forum - how to revert back to old theme?
Post by: Aleksi "Lex" Kilpinen on January 04, 2018, 05:17:12 PM
Take a look at this :)
https://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files
Title: Re: Crashed forum - how to revert back to old theme?
Post by: thenakedscientists on January 04, 2018, 05:25:40 PM
Thanks; I think that the problem is also that I have a customised theme; this seems to break the database if it doesn't start up right.

So If I over-write everything with a fresh copy of 2.0.15 what theme will it try to use?

Should I also install the Exodus theme clean too?

Yours,

Chris
Title: Re: Crashed forum - how to revert back to old theme?
Post by: Aleksi "Lex" Kilpinen on January 04, 2018, 05:31:58 PM
You can overwrite the custom theme folder with a fresh version as well.
If needed, you should be able to get to the default theme also by using /index.php?theme=1
and then be able to access the admin control panel to change theme settings further.
Title: Re: Crashed forum - how to revert back to old theme?
Post by: Illori on January 04, 2018, 05:33:23 PM
what is the error you are getting? usually a theme cannot cause a database error.
Title: Re: Crashed forum - how to revert back to old theme?
Post by: Aleksi "Lex" Kilpinen on January 04, 2018, 05:42:24 PM
Actually, I took a look and was unable to even open the forum address to see any error. My browser told me the address is stuck in an endless redirect loop. Perhaps make sure first that there isn't anything wrong on the server side that could be related to this?
Title: Re: Crashed forum - how to revert back to old theme?
Post by: Sir Osis of Liver on January 04, 2018, 05:43:42 PM
You can reset theme to default Curve in database by setting theme_default to '1' in _settings table, but I agree with Illori, this isn't theme problem.  I'm getting browser error 'This page can't be displayed', that's a server glitch.
Title: Re: Crashed forum - how to revert back to old theme?
Post by: Shambles on January 04, 2018, 05:59:17 PM
Quoteour server had a problem and has been upgraded to ... php7

See if you (or they) can put you back to php 5.6
Title: Re: Crashed forum - how to revert back to old theme?
Post by: thenakedscientists on January 04, 2018, 07:19:04 PM
Thank you very much everyone for taking the trouble to reply.

The loop problem is something a bit different - that happened after the forum failed to resurrect because I was endeavouring to put a mitigating message in place.

It's bizarre, but I've had DB problems with it before; we customised the Exodus theme; whenever we move the forum URL it errors to a white screen with "database error"; I could only move themes about by reverting it to classic, then making the changes, then reinstalling the new theme.

I'll have a go with the advice offered here next (after I fix the redirect problem) and see if I can at least get it back to classic theme by editing the DB.

Chris
Title: Re: Crashed forum - how to revert back to old theme?
Post by: thenakedscientists on January 04, 2018, 07:40:54 PM
I've fixed the loop and put the files back in there.

If you take a look at https://www.thenakedscientists.com/forum - you'll see a reported database error, and the theme doing weird stuff and duplicating bits of the page.

Thoughts?

Chris
Title: Re: Crashed forum - how to revert back to old theme?
Post by: Aleksi "Lex" Kilpinen on January 05, 2018, 01:18:53 AM
That does seem odd, to say the least.
You did mention you had problems running repair_settings earlier, does it work now and are all the settings correct?

Title: Re: Crashed forum - how to revert back to old theme?
Post by: thenakedscientists on January 05, 2018, 02:20:02 AM
Just a white screen when you call it
Title: Re: Crashed forum - how to revert back to old theme?
Post by: Aleksi "Lex" Kilpinen on January 05, 2018, 02:23:56 AM
Does the white screen leave anything in your server error log?
Title: Re: Crashed forum - how to revert back to old theme?
Post by: thenakedscientists on January 05, 2018, 02:36:32 AM
In the logs are two entries -  "PHP Fatal error:  Uncaught Error: Call to undefined function set_magic_quotes_runtime() " at both the times I've tried to run it.

Thanks for your advice.

Title: Re: Crashed forum - how to revert back to old theme?
Post by: Aleksi "Lex" Kilpinen on January 05, 2018, 02:50:17 AM
Okay, now we're getting somewhere. This function was DEPRECATED in PHP 5.3.0, and REMOVED as of PHP 7.0.0.

As far as I know, that shouldn't be a problem in the current repair_settings.php though. Are you using an old copy of the tool, or did you download a fresh one from the downloads site? https://download.simplemachines.org/index.php?tools
Title: Re: Crashed forum - how to revert back to old theme?
Post by: thenakedscientists on January 05, 2018, 03:18:53 AM
Thanks - I'd not realised that was an old copy of the tool

With a new copy, that now run; I stripped the hooks but now the error is:  PHP Fatal error:  Uncaught Error: Call to undefined function Activity_Bar_css()

I think I need to go with the suggestion to replace all the site files from scratch and then reimplement the theme and mods...?
Title: Re: Crashed forum - how to revert back to old theme?
Post by: Aleksi "Lex" Kilpinen on January 05, 2018, 03:21:41 AM
Or if you can, revert to PHP 5.6? I'm guessing your troubles are because of mods that are incompatible with your current PHP version.
Title: Re: Crashed forum - how to revert back to old theme?
Post by: thenakedscientists on January 05, 2018, 03:27:48 AM
I'll try a clean install first, which will confirm database integrity. If that is a problem then I'll go down the 5.6 route. I've got it installed on the server, but it would mean more disruption and downtime for the rest of the site while I revert to use 5.6
Title: Re: Crashed forum - how to revert back to old theme?
Post by: Aleksi "Lex" Kilpinen on January 05, 2018, 03:28:07 AM
OK, good luck :)
Title: Re: Crashed forum - how to revert back to old theme?
Post by: thenakedscientists on January 05, 2018, 04:04:59 AM
Thank you for your patient help. It is so nice to have a sympathetic ear!

I have over-written all of the Themes and Sources and then used the access that granted me to revert all users back to the classic theme, using the current db impression. That's now working again, so users and search engines can at least see the content and log in, albeit on a theme that we've not used for a long time! When my blood pressure reverts to normal, I'll take on resetting the mods and the previous theme...

Incidentally, I was using Exodus because it's a nice, clean responsive layout, but it does have some foibles, especially with moving the forum around - like the problem I have just had.

Do you know of any alternative responsive themes that are SMF approved?

Thanks again

Chris
Title: Re: Crashed forum - how to revert back to old theme?
Post by: Aleksi "Lex" Kilpinen on January 05, 2018, 04:07:58 AM
Nice to hear you got it working at least. :)

I haven't played around with themes a lot, but you could take a look at this Responsive Curve (http://custom.simplemachines.org/mods/index.php?mod=4040) for Curve
or search around the theme site (https://custom.simplemachines.org/themes/) for a suitable theme :)

P.S.
Nice stats on the forum ;) Mine gets about 25% of the page views yours is getting. I can understand the stress. :)
Title: Re: Crashed forum - how to revert back to old theme?
Post by: Illori on January 05, 2018, 05:16:07 AM
since you loaded fresh files did you also remove all the hooks before you started to install mods again? if not you need to do so. https://wiki.simplemachines.org/smf/Manually_setting_a_package_installed_or_uninstalled
Title: Re: Crashed forum - how to revert back to old theme?
Post by: thenakedscientists on January 05, 2018, 06:09:35 PM
Thank you both; I haven't stripped the hooks yet because the present install is an interim measure; I ran out of steam once I at least restored access. That's tomorrow's job!

What I really need to do is work out how I can overlay the original files and theme to restore it to health without causing that bizarre database error; there is something about the Exodus theme in the modified format I am using that does that and I have no idea why or how. The database is clearly happy and healthy, so it must be some strange hook in the theme that does it.

Any idea where I might start looking?
Title: Re: Crashed forum - how to revert back to old theme?
Post by: Aleksi "Lex" Kilpinen on January 06, 2018, 03:03:54 AM
That would be this theme right?
http://demo.smftricks.com/index.php?theme=68

In itself I don't think the theme has anything that would obviously explain it - you might want to try getting a fresh copy of the theme
https://custom.simplemachines.org/themes/index.php?lemma=2836
Install it, and test it to see if it works as is ( just don't change everyone to use it yet ) - If everything is fine and dandy,
then I'd still be inclined to say it was something in the modifications, not the theme itself.

If however it doesn't work nicely, then take a look at your server error log to see if there is anything that might explain it.
Title: Re: Crashed forum - how to revert back to old theme?
Post by: thenakedscientists on January 06, 2018, 05:56:50 AM
That's the theme, but I customised index.template.php to replace the top half of the screen with our own logo and drop-down. There must be something in those changes that cause the bug; I'll spend time today sniffing it out...

Thanks.
Title: Re: Crashed forum - how to revert back to old theme?
Post by: Aleksi "Lex" Kilpinen on January 08, 2018, 05:21:29 AM
Just thought I'd let you know - While that theme has a lot of small things that ( in my opinion ) need tweaking before going live on a production site, it does work just fine on 2.0.15.

I have recently installed it on my own production forum ( thanks for the tip ) due to it's great mobile compatibility,
and am now in the process of customizing it to my liking - and have not run in to any notable issues ( apart from the recent posts block on the index not working correctly. ) No errors, no breaking. :)
Title: Re: Crashed forum - how to revert back to old theme?
Post by: thenakedscientists on January 15, 2018, 06:53:46 AM
Thanks for this update; I've tweaked things quite extensively, as you'll see if you take a look at the now-working "properly" site.