News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Redirect issues after certain actions

Started by neurons, March 28, 2023, 04:43:26 AM

Previous topic - Next topic

neurons

Hi, in a relatively fresh SMF install with few plugins (PrettyURL which is disabled + Auto Twitter + Simple AV Embedder + Stop forum spam + Avatars Display Integration), I've been getting a weird redirect issue, but only in certain locations.

For example I can edit most .css files of a theme directly from SMF admin (cPanel/FTP of course works fine), but I cannot edit index.css of either the default theme or the Boru custom theme, as saving changes redirects to a www-free URL which breaks the cookies and/or session I guess, and logs me out. I was able to edit it this way previously, and I have also tried in the meantime to change the domain from www to without it -> this must be the reason as I can see that

?action=admin;area=theme;th=1;sa=edit

redirects to a non-www URL, even though all settings are handled by www, and theme settings are also setup in www + other css edits work fine, so why is this one failing?

Similarly, when logging in on certain browsers in the 5 secs from page load until I hit login after entering credentials, I get a session expired error, and returned back to login. Here I do not get redirected.

Anything smart to check/rebuild before a fresh reinstall since it's an option?

neurons

Second error was due to www/non-www links. Fixed via repair-settings.php, defaulting urls to remove www, and defaulting cookie name: https://wiki.simplemachines.org/smf/Repair_settings.php so should be good now.

First issue is different now - I can successfully hit the save button without getting logged out, however changes aren't actually saved - it returns me to theme root folder without appyling them. Does the same in default theme too.

Latest SMF 2.1.3, PHP 8.2 used.

Incognito modes used on Opera/Chrome/Edge for testing.

Kindred

well, if you are in incognito mode --   doesn't that prevent the full admin validation, since that depends on cookies and sessions?

Do you encounter the problem if you use normal 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."

neurons

Yep of course, I meant I tested in private mode as well. Weird thing is that it only fails index.css, other css updates fine.

Not a big deal since I update it through cpanel either way, but this got me thinking what other error that's harder to workaround I might face if this isn't working fine?

live627

Quote from: Kindred on March 28, 2023, 08:04:02 AMwell, if you are in incognito mode --   doesn't that prevent the full admin validation, since that depends on cookies and sessions?
incognito mode never breaks things like that, at least in my experience. It's great for testing things.

Advertisement: