Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: naoko15 on June 04, 2013, 04:23:11 PM

Title: Missing css styles
Post by: naoko15 on June 04, 2013, 04:23:11 PM
Hello, i need help with my forum. Suddenly all styling is missing, even though i've checked my theme files and they're all there

http://goo.gl/j3eHn

I didn't install anything, or did anything to it. It happened all of sudden.

Help will be very appreciated.

Thanks in advance.


Title: Re: Missing css styles
Post by: Shambles on June 04, 2013, 04:30:03 PM
Looks fine to me, apart from

QuoteBienvenido(a), %1$s. Por favor, ingresa o regístrate.

What do you think's missing?
Title: Re: Missing css styles
Post by: MrPhil on June 04, 2013, 06:31:12 PM
If you're occasionally failing to load your .css files, try going into Admin and disabling hostname lookup. Sometimes that will do the trick.
Title: Re: Missing css styles
Post by: naoko15 on June 05, 2013, 05:01:36 AM
Thank you for your replies. I can't find hostname lookup in admin. It is supossed to be in Features and Options-> Layout and Options, isn't it?

Also, going into Forum Maintenance results in this message:


Fatal error: Cannot redeclare template_optimize() (previously declared in /home/content/30/7728430/html/foros/SMF/Sources/Load.php(2151) : eval()'d code:1262) in /home/content/30/7728430/html/foros/SMF/Sources/Load.php(2151) : eval()'d code on line 557

I suposse it's related?
Title: Re: Missing css styles
Post by: kat on June 05, 2013, 05:16:31 AM
Can you go to Admin>Server settings and uncheck "Disable evaluation of templates"? Then, you'll get the true error, which that "eval" thing is masking.

Normally, that error crops-up if a mod's been installed twice, but you say you haven't installed anything. So, this is a bit curious.
Title: Re: Missing css styles
Post by: Shambles on June 05, 2013, 06:48:06 AM
Quote
I can't find hostname lookup in admin. It is supossed to be in Features and Options-> Layout and Options, isn't it?

No, it's in Server Settings > General
Title: Re: Missing css styles
Post by: Kindred on June 05, 2013, 11:43:28 AM
also... can not redeclare usually means that you have, somehow, double installed a mod...  the only real fix for it is to MANUALLY remove the duplicated code (and there is typically more duplication than just the part that causes the error - you have to parse through the entire mod install and find all duplicated code....)
Title: Re: Missing css styles
Post by: naoko15 on June 05, 2013, 04:54:59 PM
But the last time i installed a mod was ages ago...years even. I haven't changed or installed anything.

I've disabled evaluation of templates and the same error keeps showing up in Forum Maintenance. Also, certain areas of the admin (like Core Features) can't be opened as it says the theme won't load, although Theme Settings let me see the index.template.php and css styles

Still can't find 'Disable hostname lookup' ¿?
Title: Re: Missing css styles
Post by: kat on June 05, 2013, 05:18:36 PM
If the error's exactly the same (Which I have to say that I doubt), can you attach Load.php, so we can take a look at it?
Title: Re: Missing css styles
Post by: naoko15 on June 06, 2013, 04:29:41 AM
Of course, thank you
Title: Re: Missing css styles
Post by: kat on June 06, 2013, 05:57:08 AM
"template_optimize" doesn't even appear in that file.

So, as I mentioned, I suspect the error's different, if you disable evaluation of templates.

ManageMaintenance.template.php is more likely to be the file in question, methinks.
Title: Re: Missing css styles
Post by: naoko15 on June 06, 2013, 01:26:11 PM
Quote from: K@ on June 06, 2013, 05:57:08 AM
"template_optimize" doesn't even appear in that file.

So, as I mentioned, I suspect the error's different, if you disable evaluation of templates.

ManageMaintenance.template.php is more likely to be the file in question, methinks.

Evaluation of templates is disabled. I've only found ManageMaintenance.php in Sources. There's no ManageMaintenance.template.php. Where can i find that file?
Title: Re: Missing css styles
Post by: kat on June 06, 2013, 01:33:26 PM
In the default theme's directory.

Thing is, if templates aren't being evaluated, you shouldn't be seeing the part in red...

content/30/7728430/html/foros/SMF/Sources/Load.php(2151) : eval()'d code:1262)
Title: Re: Missing css styles
Post by: MrPhil on June 06, 2013, 01:34:50 PM
Is the error message now giving you a line number in ManageMaintenance.php? Show us that line plus maybe 10 before and 5 after (tell us which line is the one the error was reported on). And of course, the exact error message. Or are you still getting eval in the error message?
Title: Re: Missing css styles
Post by: naoko15 on June 07, 2013, 03:16:01 AM
Quote from: K@ on June 06, 2013, 01:33:26 PM
In the default theme's directory.

Thing is, if templates aren't being evaluated, you shouldn't be seeing the part in red...

content/30/7728430/html/foros/SMF/Sources/Load.php(2151) : eval()'d code:1262)

It is the strangest thing, as the error doesn't change when disabling or enabling evaluation of templates results. I've attached the file and a screen capture.

Quote from: MrPhil on June 06, 2013, 01:34:50 PM
Is the error message now giving you a line number in ManageMaintenance.php? Show us that line plus maybe 10 before and 5 after (tell us which line is the one the error was reported on). And of course, the exact error message. Or are you still getting eval in the error message?

It is still like this:

Fatal error: Cannot redeclare template_optimize() (previously declared in /home/content/30/7728430/html/foros/SMF/Sources/Load.php(2151) : eval()'d code:1262) in /home/content/30/7728430/html/foros/SMF/Sources/Load.php(2151) : eval()'d code on line 557

:/
Title: Re: Missing css styles
Post by: Shambles on June 07, 2013, 04:57:15 AM
Your default theme now appears to be the "core" theme. Eval'd template issues aside, is that what you intended (it wasn't like that when I looked a couple of days ago).
Title: Re: Missing css styles
Post by: naoko15 on June 07, 2013, 11:41:55 AM
Quote from: Shambles on June 07, 2013, 04:57:15 AM
Your default theme now appears to be the "core" theme. Eval'd template issues aside, is that what you intended (it wasn't like that when I looked a couple of days ago).

Yes, i changed it to see what happened. I've changed it back.
Title: Re: Missing css styles
Post by: kat on June 07, 2013, 12:07:37 PM
Template evaluation can't've been disabled, if you're still getting the eval()'d thing.

Are you sure that's got a check beside it?
Title: Re: Missing css styles
Post by: Kindred on June 07, 2013, 12:24:57 PM
actually, it could, K@...   in this case, I think that the error may be buried deep.

However, the duplicate function error message does tell us that he has issues... he just has to FIND wherre the function was added and why it was added twice.
Title: Re: Missing css styles
Post by: kat on June 07, 2013, 12:31:22 PM
It could? Golly, I hadn't realised that, at all. Ta!

I guess we need to see if a mod's been installed, of late, then, ay?
Title: Re: Missing css styles
Post by: Kindred on June 07, 2013, 12:36:17 PM
I have seen eval remain, especially when portal blocks are involved...
basically, the "turn off eval" function works correctly within the SMF standard files, normally...   however, in this case I think he's got deeper issues.
Title: Re: Missing css styles
Post by: kat on June 07, 2013, 12:40:00 PM
Sure looks that way. Let's see if we can get info on mods and stuff...

Actually, a URL might help, too, so we can inspect an element, or twelve. :)
Title: Re: Missing css styles
Post by: kat on June 07, 2013, 12:41:14 PM
I did a bit of detective work. It COULD be here:

http://sinfomusic.net/foros/SMF/index.php

ETA... Just read the first post... http://goo.gl/j3eHn

Same place.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.katzy.dsl.pipex.com%2FSmileys%2Fdoh.gif&hash=d238912591ba469b2bd21abd9b8321ddea0c5fe8)
Title: Re: Missing css styles
Post by: naoko15 on June 09, 2013, 04:48:22 AM
So...what should i do? : (
Title: Re: Missing css styles
Post by: kat on June 09, 2013, 06:05:06 AM
Quote from: K@ on June 07, 2013, 12:40:00 PM
Sure looks that way. Let's see if we can get info on mods and stuff...

What mods do you have, installed?
Title: Re: Missing css styles
Post by: naoko15 on June 09, 2013, 08:21:17 AM
These are my mods...but i installed them ages ago
Title: Re: Missing css styles
Post by: MrPhil on June 09, 2013, 10:56:29 AM
Are you really only at SMF 2.0 Beta 1? That's ancient. Lots of bugs have been fixed since then. You ought to be thinking about installing 2.0.4 and migrating your database to that. Make a test copy to experiment with, so you don't mess up your production forum. Try installing your mods to see if you can't make any work at 2.0.4. I'm not sure if there is a "small upgrade" path to get to 2.0.4, or if you'd be better off doing a Large Upgrade directly to 2.0.4. Beta 1 is woefully out of date, and probably has been hacked.

You do seem to have "eval" turned off, according to the screenshot. With no portal installed, it's puzzling as to where the "eval" is coming from, unless it's something from way back in Beta 1.

If you're getting a "cannot redeclare" all of a sudden, I would suspect that someone or something has modified your code without your permission. Take a look at the "last modified" date on all your SMF files, to see if something's been edited by a hack. Also look around for files that you cannot account for as properly being part of SMF (e.g., backdoors and Trojans).
Title: Re: Missing css styles
Post by: naoko15 on June 10, 2013, 05:54:55 PM
Thank you, i've checked the forum's files but found nothing out of the ordinary.

Also, i followed your advice and upgraded to SMF 2.0.4. At first, It loaded the detault theme ok, but in a while it stopped working. I didn't install anything or changed the default template. Now it displays this error message:

"Unable to load the 'main_above' template."

I've tried typing .../index.php?theme=1 but it doesn't work : (

Help please





Title: Re: Missing css styles
Post by: naoko15 on June 12, 2013, 03:24:52 AM
Sorry to bump this, but i've no idea what to do, i'm desperate...i really need help
Title: Re: Missing css styles
Post by: kat on June 12, 2013, 06:24:10 AM
OK.

It WAS working. Then, it wasn't.

There must've been something that was done, just before it stopped working.
Title: Re: Missing css styles
Post by: naoko15 on June 12, 2013, 06:51:55 AM
Thanks for your reply, My brother just told me he tried to change the configuration of a mod called 'Separated Birthday from Events' . But i don't know how that could affect the forum, as i think mods aren't working anymore after the update? There hasn't been any more changes.
Title: Re: Missing css styles
Post by: kat on June 12, 2013, 06:58:12 AM
Oh, hell. Give your brother a slap. ;)

Wanna try this, to get your forum files into a virgin state?

http://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files

Also, tell your brother to read my sig, before he goes poking around, will you? Tell him to click it, to get the full "How do I do that?" thing. ;)
Title: Re: Missing css styles
Post by: naoko15 on June 12, 2013, 01:43:20 PM
Ok, i followed the instructions but it didn't work...it's still the same : (
Title: Re: Missing css styles
Post by: kat on June 12, 2013, 02:54:25 PM
Even if you use the default theme, it seems. That may be because you made another theme the forum default and denied people the choice to select others.

If that's the case, what happens, if you rename the theme you have set as the default? Just add a zero to the end of the directory name, or something.
Title: Re: Missing css styles
Post by: naoko15 on June 12, 2013, 05:25:00 PM
Renamed default directory and nothing changed
Title: Re: Missing css styles
Post by: kat on June 13, 2013, 06:44:15 AM
NOOOO! Not the SMF default theme!

Quotewhat happens, if you rename the theme you have set as the default?

i.e. your forum's default theme, not the one named "default".

If you rename that theme, your forum should switch to the SMF default theme, automatically. Or croak, entirely. In which case, name the directory back to it's original name.
Title: Re: Missing css styles
Post by: naoko15 on June 13, 2013, 03:07:21 PM
That's it, i had the default theme as 'default'.
Title: Re: Missing css styles
Post by: kat on June 13, 2013, 03:15:36 PM
You replaced all the files, with new ones. This error really shouldn't be happening, then.

Did you ever find out what your brother did, before you slapped him?
Title: Re: Missing css styles
Post by: naoko15 on June 13, 2013, 03:36:16 PM
Yes, i replaced them. I think my brother tried to change the configuration of the calendar
Title: Re: Missing css styles
Post by: kat on June 13, 2013, 04:18:00 PM
Ever thought of banning him? ;)

I don't suppose you have backup, from before he started messing with things, do you?

If you restore a backup of the software, but not the database, you should get the forum back and not lose any posts.

If not, you could try asking your host about that, coz they might have one.
Title: Re: Missing css styles
Post by: naoko15 on June 13, 2013, 05:11:52 PM
hehe i might do that when i get the forum back!

I didn't have time to backup the files or the database after the update, but i have a backup copy of the forum before the update. Is it of any use?
Title: Re: Missing css styles
Post by: kat on June 14, 2013, 07:10:39 AM
Not unless you fancy wiping out what's there, restoring the backup and redoing the upgrade. Whilst that might be a plan, of sorts, you'll lose any posts made after you upgraded.

Have you asked your host?

You might even have a backup available, if your CPanel has "R1Soft Restore Backups", in the "Files" section, as mine has. If you have that, you can access backups, from there.
Title: Re: Missing css styles
Post by: naoko15 on June 18, 2013, 06:10:27 AM
So, i've solved my issue by rebuilding the forum in another directory, upgrading and moving it to my default directory.

Now i have another problem. The forum was working ok since i rebuilt it (one whole day! ; )) but today my users tell me they can't login. Login results in a 'page not found page'...in all browsers. I've checked chmod and they seem ok.

Whay can i do?

http://tinyurl.com/mg9wjr3


Thanks!!
Title: Re: Missing css styles
Post by: Kindred on June 18, 2013, 07:15:32 AM
sees to me that the forum is in maintenance mode...
Title: Re: Missing css styles
Post by: kat on June 18, 2013, 07:22:54 AM
That sure wouldn't help. ;)

If they can't log in, when you're not in maintenance mode, it might be that, as you've moved things to a different directory and back, again, your paths are wrong, now.

http://wiki.simplemachines.org/smf/Repair_settings.php
Title: Re: Missing css styles
Post by: naoko15 on June 18, 2013, 07:49:33 AM
If turned off maintenance mode, so you can see.

I already run repair_sttings when i moved the forum and it worked. Also, another strange thing is that i had a custom template loaded (checked that the paths were ok at admin), and it has changed to the previous one.
Title: Re: Missing css styles
Post by: kat on June 18, 2013, 08:13:27 AM
You don't have the same host as this guy, do you? http://www.simplemachines.org/community/index.php?topic=506095.msg3563411#msg3563411

He's getting exactly the same errors!

Can you log in, yourself?
Title: Re: Missing css styles
Post by: naoko15 on June 18, 2013, 08:22:07 AM
I am at Godaddy. I can't login neither. How frustrating all this.  :-\
Title: Re: Missing css styles
Post by: kat on June 18, 2013, 08:25:27 AM
I wonder who his host is....?

Unfortunately, Godaddy are famous, for this kinda thing. :(

Have you contact them, about this? (Although, I suspect they're just gonna refer you back here)

I'm wondering if you ought to get "mod_security" disabled and check that you have full CHOWN ownership of your files.
Title: Re: Missing css styles
Post by: Kindred on June 18, 2013, 08:37:26 AM
well... can we have a test login/password?
Title: Re: Missing css styles
Post by: kat on June 18, 2013, 08:48:21 AM
I considered that, myself. But, if he can't get into admin, he can't set up an account... :(

Unless he PMs his own details, for course.
Title: Re: Missing css styles
Post by: naoko15 on June 18, 2013, 08:56:37 AM
Well,i  disabled mod_security and that seemed to do the trick. It's working great now...i'm crossing my fingers it stays this way.

Thank you for the help, i wouldn't have been able to figure it out on my own!!
Title: Re: Missing css styles
Post by: kat on June 18, 2013, 09:51:22 AM
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.katzy.dsl.pipex.com%2FSmileys%2Fwoohoo.gif&hash=442d820e90e439f1b2b8366580a5ff975588fe3f)
Title: Re: Missing css styles
Post by: MrPhil on June 18, 2013, 10:13:09 AM
Amazing what that damned mod_security can break! I wonder if SMF could automatically check for it (during installation) and at least warn the admin to turn it off. It might be automatically added to .htaccess, but I'm not sure that all hosts have the same codes to turn it off, or that they even allow mere mortals to turn off "security".

If the SMF prereqs list doesn't already say so, it should warn installers in big bold letters that they MUST turn off mod_security for SMF to run properly.
Title: Re: Missing css styles
Post by: kat on June 18, 2013, 10:49:15 AM
I have a feeling that some hosts see things and think "OO! That's a good idea! We can show how secure our servers are, with that!", without, actually, looking at what it, actually, does.

If I had god-like powers, it'd all vanish with a flash. A flash with a bit of pizzazz, too. ;)