Skip to main content
Topic: SMF 2.0 -> Elk -> Unable to login, check your cookie settings (Read 4060 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

SMF 2.0 -> Elk -> Unable to login, check your cookie settings

Well, I'd prepared just about everything on the Elk side of things and I figured I'd give the actual importing a try, but after importing my forum data I can't login.

'You were unable to login.  Please check your cookie settings.'

(Yes, I deleted all cookies.)

I also tried fresh without importing settings, but apparently that's not the problem.

What does help is if I change my user ID from 1 to something else. This issue doesn't seem to be affected by clearing out the sessions table either. So basically I was wondering if anyone has a clue as to what might be going on?

Re: SMF 2.0 -> Elk -> Unable to login, check your cookie settings

Reply #1

As an aside, because it doesn't affect anything, I think that
Code: [Select]
1 AS id_theme
should be
Code: [Select]
0 AS id_theme
on account of that seems to be the default.

Oh yeah, I should've added the specific versions rather than consider them implied as the latest stable of everything: SMF 2.0.11, Elk 1.0.7, and OpenImporter stable ("1.0 alpha").

Re: SMF 2.0 -> Elk -> Unable to login, check your cookie settings

Reply #2

After a nice long break I took another look and realized I should've paid more attention to the error log. (Hey, I told PHP to print out errors so I wouldn't have to… dunno why it didn't.) Some quick selective importing later, I've narrowed it down to the avatars for sure.

Code: [Select]
Undefined index: custom_avatar_url

Sticking it in manually seems to fix the issue.

Code: [Select]
INSERT INTO [icode]xxx_settings[/icode] ([icode]variable[/icode], [icode]value[/icode]) VALUES ('custom_avatar_url', 'http://lalala/avs')

First dinner, then I'll check how to fix up OpenImporter.

Edit: hm, I'm not entirely sure if I approached it wrong or if OpenImporter does. It's obvious that for add-on columns I'll have to create columns either through installing add-ons or by doing it manually, but at the same time this is a built-in setting similar to all other built-in settings.

But perhaps it's primarily a bug in Elk. This seems like the kind of minor problem you'd expect to easily (albeit somewhat annoyingly) fix up through the admin interface, just like the theme locations if you've changed servers or whatnot. Then again, I presume Elk would work if only there were a location to point to, right or wrong.
Last Edit: April 10, 2016, 02:19:16 pm by Frenzie

Re: SMF 2.0 -> Elk -> Unable to login, check your cookie settings

Reply #3

Looks like the value "custom_avatar_url" should be added to the $do_import array in smf2-0_importer.xml file ... no sure why that was preventing you from logging in though, but certainly a value that if it is set should be imported.

Re: SMF 2.0 -> Elk -> Unable to login, check your cookie settings

Reply #4

Well, it wasn't preventing me from logging in exactly. The cookies are set, I can post, I can access the admin interface to a certain degree — perhaps even to change the custom_avatar_url. When I post it shows up correctly as my username, but as if I were a guest (except guest posting is disabled). I can't access my own profile either, being a kind of super-elevated guest and all. It's all pretty freaky. :P

Anyway, that probably explains why it all worked when I changed my user id from 1 to something more or less at random. No avatar in the attachments table.

Re: SMF 2.0 -> Elk -> Unable to login, check your cookie settings

Reply #5

 emanuele feels a (LEFT?) JOIN is playing some trick somewhere.

By the description looks almost like one of the queries that JOIN the attachments table to get the avatar is messing up badly the recognition of the user when some data is missing.

But this is just a wild guess before dinner and after a pair of tiresome days.
Bugs creator.
Features destroyer.
Template killer.