News:

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

Main Menu

Social Login

Started by Claude, OneAll, February 01, 2013, 03:57:31 PM

Previous topic - Next topic

landyvlad

#320
OK here 'tis


Code ((Find)) Select


<p class="smalltext"><a href="', $scripturl, '?action=reminder">', $txt['forgot_your_password'], '</a></p>';

// OneAll Social Login (https://docs.oneall.com/plugins/)
template_oneall_social_login();

echo '


Code ((Replace)) Select


<p class="smalltext"><a href="', $scripturl, '?action=reminder">', $txt['forgot_your_password'], '</a></p>


and


Code ((Find)) Select


<p class="centertext"><input type="submit" value="', $txt['login'], '" class="button_submit" /></p>
<p class="centertext smalltext"><a href="', $scripturl, '?action=reminder">', $txt['forgot_your_password'], '</a></p>';

// OneAll Social Login (https://docs.oneall.com/plugins/)
template_oneall_social_login();

echo '



Code ((Replace)) Select


<p class="centertext"><input type="submit" value="', $txt['login'], '" class="button_submit" /></p>
<p class="centertext smalltext"><a href="', $scripturl, '?action=reminder">', $txt['forgot_your_password'], '</a></p>




[Kindred edit - please use actual code tags]
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

GigaWatt

OK, I'm guessing this is from the first error in Login.template.php. Could you please attach this file too (sorry, I forgot to mention it in my previous post). It's located in /forum_root/Themes/default/.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

landyvlad

OK will do tonight if I can. Ta.
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

landyvlad

attached per request :)

"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

GigaWatt

Well, here's your problem. In the first code snippet, Login.template.php actually has this code instead of the code the uninstaller is looking for.

Code (Login.template.php (first code snippet)) Select
<p class="smalltext"><a href="', $scripturl, '?action=reminder">', $txt['forgot_your_password'], '</a></p><input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />';

// OneAll Social Login (https://docs.oneall.com/plugins/)
template_oneall_social_login();

echo '


And in the second code snippet, Login.template.php has this instead of what the uninstaller requires.

Code (Login.template.php (second code snippet)) Select
<p class="centertext"><input type="submit" value="', $txt['login'], '" class="button_submit" /></p>
<p class="centertext smalltext"><a href="', $scripturl, '?action=reminder">', $txt['forgot_your_password'], '</a></p><input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />';

// OneAll Social Login (https://docs.oneall.com/plugins/)
template_oneall_social_login();

echo '


These must be edits from some mod. I edited Login.template.php in 2 different ways. You'll use Login.template.php.for.social.login.uninstall to uninstall the mod and Login.template.php.after.social.login.uninstall after you've uninstalled the mod.

So, the procedure would go like this.

01) Copy your original Login.template.php and name it Login.template.php.bak1.

02) Copy both Login.template.php.for.social.login.uninstall and Login.template.php.after.social.login.uninstall in the same directory (/forum_root/Themes/default/).

03) Delete Login.template.php.

04) Rename Login.template.php.for.social.login.uninstall to Login.template.php.

05) Uninstall the mod. The tests should pass now.

06) Rename Login.template.php to Login.template.php.bak2

07) Rename Login.template.php.after.social.login.uninstall to Login.template.php.

08) Check if everything works OK (logging in and out). Test the forum for a day or two, see if any members report any login/logout issues. If not, that's it.

Just in case, keep Login.template.php.bak1 and Login.template.php.bak2. After a few months, if there are no issues, you could probably delete them, but keep a local backup of the forum's files (like one named "before social login uninstall" and the other one "after social login uninstall") ;).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

GigaWatt

#325
Actually, I just noticed this, but it looks like the mod was last updated before the 2.0.14+ login fix, so that is what's causing the problem, this additional piece of code.

<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

landyvlad

Firstly thanks for all the work in the big post, much appreciated.

However I'm not sure what you mean in the second brief post. Does that imply there is something much simpler that I need to do? Or something additional?
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

GigaWatt

What I meant was, the Social Login mod was updated before the 2.0.14+ login fix, but you must have installed it before the 2.0.14 login fix.

Hmmm... do you have the this mod installed?
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

landyvlad

Yes social login has been installed since 2.0.13.

I wasn't aware of any 2.0.14+ login issues ?

No, I don't have that mod installed.
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

GigaWatt

They weren't login issues... well, they were if you upgraded to 2.0.14 but only if you had a theme or a portal that wasn't up to date. That was a security login patch (released as a mod for those who didn't want or didn't know hot to manually patch their themes) and is theme dependent (you have to apply it on your theme).

So, you probably have the 2.0.14 and 2.0.15 small upgrade packages installed, you're using Curve and that might explain how the fix got in the code (SMF also patches it's own theme files).

There's no easy way around it. You'll have to follow the steps I wrote in my previous post. Just don't forget to be logged in when you do all of that editing. So, basically, you should have your FTP program running and be logged in the forum before you do any of that, because you wouldn't be able to log in once you remove that piece of code :S.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

landyvlad

#330
OK thanks

Quoteyou probably have the 2.0.14 and 2.0.15 small upgrade packages installed, you're using Curve

Precisely the case :)

Any issues with putting the forum into maintenance mode while I do those things suggested? I assume it's OK but I figure I'd check first :)

"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

GigaWatt

Quote from: landyvlad on July 17, 2018, 10:07:34 PM
Any issues with putting the forum into maintenance mode while I do those things suggested? I assume it's OK but I figure I'd check first :)

Yes, that's not a problem ;). Actually, it's preferred since users that might try to log in, won't be able to because... well, that code is the login fix :S. Without it, nobody would be able to log in :S.

Just make sure you bring the code back before you log out ;). So, basically, do all of the edits while you're logged in, uninstall the mod from the Admin panel, bring back all of the code that you removed (i.e. the 2.0.14+ login fix) and then logout ;).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

landyvlad

Quote from: GigaWatt on July 18, 2018, 05:13:35 AM
bring back all of the code that you removed (i.e. the 2.0.14+ login fix) and then logout ;).

Umm, I never installed any login fix.
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

Arantor

You never tweaked the login form on any of your themes, either manually or through a mod?

Because 2.0.14 introduced a security change that stopped most custom themes working correctly for login boxes...

landyvlad

No aside from social login none of the mods I've installed would have (as far as I can imagine) made any changes to the login stuff.

I ONLY use curve theme (with responsive curve mod installed). No other themes.



"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

Arantor

Ok, so that would imply no fix required since Curve did get the relevant change. Something weird is afoot.

landyvlad

GigaWatt if you happen to be online can you pop acorss and have a look here please:
https://www.simplemachines.org/community/index.php?topic=561276.0
Just in case the two issues are related?
Cheers
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

landyvlad

OK well after some dramas it's now gone and uninstalled and deleted and.. gone.  Thanks all for your help.
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

GigaWatt

Glad you have it sorted out ;)... and sorry for the inconvenience :S.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

SilverKnight

Needs to be updated to support discord, one all already supports that

Advertisement: