Patching to 2.0.14 test failed on custom theme.

Started by lurkalot, May 15, 2017, 05:01:44 PM

Previous topic - Next topic

lurkalot

Just upgraded one of my sites to 2.0.14 and get a test failed error on the custom theme (Gray Style). 

The code <input type="hidden" name="hash_passwrd" value="" /> doesn't appear to be in the file. I read in another thread https://www.simplemachines.org/community/index.php?topic=553860.0 that this error can be ignored. Anyway gave it a try and if I use the login at the top of the theme //mywebsitedotcom/index.php?action=login2 it gives 

An Error Has Occurred!
Your session timed out while posting. Please go back and try again.

If however I log in from the main menu = //mywebsitedotcom/index.php?action=login  Then I can log in ok.

I uninstalled the patch and reistalled the patch this time not checking install on other themes, and same result as above.
 
Any ideas?

vbgamer45

I would put that code from the patch before </form> tag if you have a login option on that theme.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

lurkalot

Thanks vbgamer45, that was quick.  8) You mean exactly like this this?


       echo '
         <div class="user_bar">
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
<form id="guest_form" action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<span>'.$txt['username'].': </span><input type="text" name="user" size="10" class="input_text" />
<span>'.$txt['password'].': </span><input type="password" name="passwrd" size="10" class="input_password" />
<input type="submit" value="', $txt['login'], '" class="button_submit" />
<input type="hidden" name="hash_passwrd" value="" /><input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
</form>
      </div>';
      }


If I have it correct I'll give it a go on my site and report back.

Gluz

From what I tested in my site this should be enough, I do modify my theme because of that error.

<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />

lurkalot

Quote from: vbgamer45 on May 15, 2017, 05:02:53 PM
I would put that code from the patch before </form> tag if you have a login option on that theme.

Thanks vbgamer45, I went ahead and tried it, works nicely now.

Cheers.

lurkalot

Quote from: Gluz on May 15, 2017, 05:16:18 PM
From what I tested in my site this should be enough, I do modify my theme because of that error.

Gluz,  I was doing the edit that vbgamer45 suggested while you posted, and his fix appears to have done the trick. Thanks for the help though.  ;)

lurkalot

Thanks to whoever marked this solved for me, I did come back to do this yesterday but was too late. 

I did have a follow up question regarding this issue though.  What happens if the theme is downloaded and installed after the 2.0.14 patch?  Do all the themes need updating now?  Just curious.

Arantor


lurkalot

Quote from: Arantor on May 16, 2017, 04:03:07 PM
All themes need updating now.

Thanks, thought that might be the case but wasn't sure.

PPI Karl

My forum has been having this exact same problem since I updated to 2.0.14.  This is probably the dumbest question of the day, but, in which file should I be placing the code? <input type="hidden" name="hash_passwrd" value="" /> 

I'm using a slightly customized version of the Black Day theme.  Thanks for your help and patience.

vbgamer45

#10
in your themes index.template.php look BEFORE the </form> tag add

<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro


lurkalot

Quote from: vbgamer45 on May 20, 2017, 01:05:17 PM
in your themes index.template.php look after the </form> tag add

<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />


Jut curious. Does it matter if it's before or after the </form> tag?  Just I added it before the tag as per your post above.

Arantor

Needs to be inside the <form> so it if it is after the </form> it is outside of everything the form is...

vbgamer45

Yeah my mistake on the wording there. should be that closing </form> tag
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

lurkalot

Quote from: Arantor on May 20, 2017, 01:20:24 PM
Needs to be inside the <form> so it if it is after the </form> it is outside of everything the form is...

Thanks Pete.

Quote from: vbgamer45 on May 20, 2017, 01:30:29 PM
Yeah my mistake on the wording there. should be that closing </form> tag

Thanks, yes it's working fine.  I just noticed a few posts where its saying to add it after the closing form tag that's all.  None of them complained which made me ask.

Arantor

Either add it in after the starting <form> or before the closing </form> would work :)

lurkalot

Quote from: Arantor on May 20, 2017, 02:28:20 PM
Either add it in after the starting <form> or before the closing </form> would work :)

Thanks.  Yes I've got it like that, but if you look here for example, https://www.simplemachines.org/community/index.php?topic=553950.msg3926390#msg3926390

Arantor

That's taken directly from the patch where the actual code says 'after' because position="after" means 'put the thing I found after the code I want to add' because Package Manager is internally backwards.

ForumGuy789

#19
This is why i usually wait a week for 2 before installing new updates. Customers are not going to try all the different login methods to get in .. they'll use one then give up. How long do you think that we'll need to wait until there is an update to fix this update? If you make the fix in 2.0.15 then I'll prob skip 2.0.14 if possible. IMO, it sounds like a big problem (people not being able to log in). I know i can edit some code to fix this but if all SMF users need to do this then that's really asking a lot.

Advertisement: