News:

This is the third lot of news

Main Menu

Error trying to change themes

Started by Dave, Apr 06, 2023, 09:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dave

I thought I'd have a look at the 'thumbnail.png I converted and went to change themes, but upon clicking on the 'change' button I get a 500 error and the page will not open.

This seems to me it must be a template issue and I have touched that, in fact I haven't made any changes at all to this theme on here

Bocool

#1
It's not your fault. It's something I've done. I've been trying to rack my brain for the fix as I've fixed it once before. LMAO

EDIT: The only files I've changes were index.template, Boardindex.template, and Settings.enghish.php.  I've uploaded ones from the Default and still get the same. It's gotta be something else...

Dave

#2
If it helps I temporarily swapped all the templates in Ambassador for the ones on my site and it still does it.

While I'm typing this I wonder if it's board wide and something to do with the SMF default files....what this space.


As and aside on my test site when I go to Admin>Maintenance>Server Settings>PHP Info the block has gone over the width of the page.  The odd thing is that this doesn't happen with Firefox. It doesn't seem to be replated to Ambassador so maybe I have an issues with something relating to SMF files the same as you. If I can't find it I'll try a new installation of the test site.

UPDATE: 1

I have systematically changed all the SMF default files on here (and put them back as they were) and no matter what I do I cannot stop the 500 error for the theme change. I wonder now if this is a server issue. By changing all the files it should have resolved it.

I have a suggestion.. firstly forgive me if I'm trying to teach you to suck eggs, as the saying goes. But even the best coders are a little wary of the database.

If you go into the database, go to 'Members' Then click 'Edit' on your username. In the list that follows find 'id_theme' what ever the number is in the 'Value' box change it to '1', go to the bottom of the page and click 'Go'

If you already have this site open, do Ctrl+F5 and the theme should change to SMF Default Curve. Once there go back to your profile and see if you can change the theme.


If that doesn't work then I would suggest create a new test forum on the same host, once installed add a theme of your choice and when that's done, go to your profile and repeat the process on that installation, if it still doesn't work you'll know it's the server.

UPDATE 2:

I installed a new test site and it did the same again on that, so why it's spanning more than the width of the page I don't know.


[attachment deleted by admin]

Bocool

Ha! I've figured it out, almost! LOL The problem is that that text is not auto-wrapping to conform to the width of the wrapper.

The problem does exist in Firefix and Chrome but in different places. The text doesn't wrap-around...I.E., break to create a new line to keep the width. If you look at one of the areas where it has long text you'll notice it is wider there.

TwitchisMental

This issue happens on all themes including default.

This seems to be something server side.
This is a signature.

TwitchisMental

Okay upon some research I may have found the causation .

If your web host has mod_security enable, it can cause random issues like this one.

See more information here - https://wiki.simplemachines.org/smf/Mod_security_-_Having_problems_with_mod_security
This is a signature.

Bocool

Probably, but I do remember having this issue before and fixed it. However, my dumb ass didn't document in case it happens later. >:(

Just read your post before I've posted this. And, mod_security is not enabled on the server and am SURE that wasn't the problem last time cause when it was enabled it blocked Les' IP and he was unable to access the server without VPN so we disabled it about 2 years or more ago.

I just check and it is not enabled. I don't think it is a server issue because more pages would be disabled...

TwitchisMental

#7
Quote from: Bocool on Apr 07, 2023, 10:11 PMProbably, but I do remember having this issue before and fixed it. However, my dumb ass didn't document in case it happens later. >:(

Just read your post before I've posted this. And, mod_security is not enabled on the server and am SURE that wasn't the problem last time cause when it was enabled it blocked Les' IP and he was unable to access the server without VPN so we disabled it about 2 years or more ago.

I just check and it is not enabled. I don't think it is a server issue because more pages would be disabled...
Well darn I was hoping it was that easy lol.


It happens on all themes. Dave has reported that he made a new test site and still gets the error as well.

That suggests something server side and/or general configuration issue, in my opinion anyways haha.

Edit: Attempted trying different cache methods... no go on that either.
This is a signature.

TwitchisMental

A thing or two to try.

Make a copy of your htaccess, remove it, and create a fresh one.

Does the issue still occur?

Have you tried running repair_Settings? While unlikely, it is worth checking.

Any errors on the server side error log?
This is a signature.

Bocool

1.  Nothing in .httaccess.

2.  No need to run repair_settings as this is a new test site and not an upgraded one.

3.  No errors in the server log that I'm aware of...

Dave

#10
Quote from: TwitchisMental on Apr 07, 2023, 10:29 PMA thing or two to try.

Make a copy of your htaccess, remove it, and create a fresh one.

Does the issue still occur?

Have you tried running repair_Settings? While unlikely, it is worth checking.

Any errors on the server side error log?


1. I don't want to remove the .htaccess file as I did a sneaky with the host. I was getting an error which I contacted my host about but they said it wasn't them but I was sure it was mod_security so I found a piece of code that goes into the .htaccess file that you can stop it from running, but in order for it to work you have to restart the server. So I put the code in the file and got the host to move the server to the Netherlands and by doing this the issue didn't happen anymore because the server was restarted.

2. Did a repair settings no change

3. I have no error logs in any of my sites, which I'm taking as a good thing.

It doesn't happen with Firefox, so maybe this is more a browser issue.



[attachment deleted by admin]

Dave

#11
Steve,

Did you try the fix for the theme change issue that I posted?
OK well I did it another way and the issue still happens with Default Curve so it's noting to do with the themes directly.
The only option is to overwrite all SMF files with new ones. I did do this but only one folder/file at a time. So while you guys are sleeping I will try that.


OK I've found what the issue was...

For some reason on this site SMF doesn't like themes with a hyphen in them and Xmas-Dave had one, so after a couple of hours of renaming and uploading I solved it by deleting the current version of the theme and then uploading another version but removed the hyphen.

As you would have seen I set everyone to the default curve so you can change back to whatever theme you were working on at the time.

Although that fixed the issue on here on Quizland the theme is named the same but there are no issues there, so maybe on here it's a little more deep rooted, but at least we can now change themes


Bocool

Thanks! I'm sure that I remembered doing something else to fix it. But as long as it works I'm happy! LOL

EDIT: It's working for me! YEAH! LOL

TwitchisMental

#13
Quote from: Dave on Apr 08, 2023, 02:42 AMSteve,

Did you try the fix for the theme change issue that I posted?
OK well I did it another way and the issue still happens with Default Curve so it's noting to do with the themes directly.
The only option is to overwrite all SMF files with new ones. I did do this but only one folder/file at a time. So while you guys are sleeping I will try that.


OK I've found what the issue was...

For some reason on this site SMF doesn't like themes with a hyphen in them and Xmas-Dave had one, so after a couple of hours of renaming and uploading I solved it by deleting the current version of the theme and then uploading another version but removed the hyphen.

As you would have seen I set everyone to the default curve so you can change back to whatever theme you were working on at the time.

Although that fixed the issue on here on Quizland the theme is named the same but there are no issues there, so maybe on here it's a little more deep rooted, but at least we can now change themes



Very interesting, glad to see the issue is resolved. Still need to find the why though XD .
This is a signature.

Bocool

Sorry, my grandson stopped by for a bit and running all over the house. LOL

It's possible that it may to do with the way this server reads files...