News:

Join the Facebook Fan Page.

Main Menu

Missing css styles

Started by naoko15, June 04, 2013, 04:23:11 PM

Previous topic - Next topic

naoko15

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.



Shambles

Looks fine to me, apart from

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

What do you think's missing?

MrPhil

If you're occasionally failing to load your .css files, try going into Admin and disabling hostname lookup. Sometimes that will do the trick.

naoko15

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?

kat

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.

Shambles

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

Kindred

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....)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

naoko15

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' ¿?

kat

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?

naoko15


kat

"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.

naoko15

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?

kat

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)

MrPhil

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?

naoko15

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

:/

Shambles

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).

naoko15

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.

kat

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?

Kindred

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.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

kat

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?

Kindred

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.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

kat

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. :)

kat

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.


naoko15

So...what should i do? : (

kat

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?

naoko15

These are my mods...but i installed them ages ago

MrPhil

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).

naoko15

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






naoko15

Sorry to bump this, but i've no idea what to do, i'm desperate...i really need help

kat

OK.

It WAS working. Then, it wasn't.

There must've been something that was done, just before it stopped working.

naoko15

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.

kat

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. ;)

naoko15

Ok, i followed the instructions but it didn't work...it's still the same : (

kat

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.

naoko15

Renamed default directory and nothing changed

kat

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.

naoko15

That's it, i had the default theme as 'default'.

kat

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?

naoko15

Yes, i replaced them. I think my brother tried to change the configuration of the calendar

kat

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.

naoko15

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?

kat

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.

naoko15

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!!

Kindred

sees to me that the forum is in maintenance mode...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

kat

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

naoko15

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.

kat

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?

naoko15

I am at Godaddy. I can't login neither. How frustrating all this.  :-\

kat

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.

Kindred

well... can we have a test login/password?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

kat

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.

naoko15

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!!


MrPhil

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.

kat

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. ;)

Advertisement: