Advertisement:

Author Topic: Patching to 2.0.14 test failed on custom theme.  (Read 2006 times)

Offline lurkalot

  • Sr. Member
  • ****
  • Posts: 883
  • Gender: Male
  • Tinyportal Support
    • guitaristguild on Facebook
    • Tinyportal on GitHub
    • @GuitaristGuild on Twitter
    • Guitarist Guild
Patching to 2.0.14 test failed on custom theme.
« on: May 15, 2017, 05:01:44 PM »
Just upgraded one of my sites to 2.0.14 and get a test failed error on the custom theme (Gray Style). 

The code
Code: [Select]
<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?

Tinyportal.net Official Support Site For TinyPortal.
Camera Craniums Running SMF 2.0.13 / Tinyportal 1.2
Guitarist Guild Running SMF 2.0.14 / Tinyportal 1.2R Beta

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 18,958
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Patching to 2.0.14 test failed on custom theme.
« Reply #1 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.
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

Offline lurkalot

  • Sr. Member
  • ****
  • Posts: 883
  • Gender: Male
  • Tinyportal Support
    • guitaristguild on Facebook
    • Tinyportal on GitHub
    • @GuitaristGuild on Twitter
    • Guitarist Guild
Re: Patching to 2.0.14 test failed on custom theme.
« Reply #2 on: May 15, 2017, 05:12:39 PM »
Thanks vbgamer45, that was quick.  8) You mean exactly like this this?

Code: [Select]
       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.

Tinyportal.net Official Support Site For TinyPortal.
Camera Craniums Running SMF 2.0.13 / Tinyportal 1.2
Guitarist Guild Running SMF 2.0.14 / Tinyportal 1.2R Beta

Online Gluz

  • Native Language Support Specialist
  • Sr. Member
  • *
  • Posts: 768
  • Gender: Male
    • Al-eXs on GitHub
Re: Patching to 2.0.14 test failed on custom theme.
« Reply #3 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.

Code: [Select]
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
Need help with PHP, HTML, CSS, Themes or MODs?

Quote
Think in spanish, habla en ingl├ęs.

Offline lurkalot

  • Sr. Member
  • ****
  • Posts: 883
  • Gender: Male
  • Tinyportal Support
    • guitaristguild on Facebook
    • Tinyportal on GitHub
    • @GuitaristGuild on Twitter
    • Guitarist Guild
Re: Patching to 2.0.14 test failed on custom theme.
« Reply #4 on: May 15, 2017, 05:25:13 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.

Tinyportal.net Official Support Site For TinyPortal.
Camera Craniums Running SMF 2.0.13 / Tinyportal 1.2
Guitarist Guild Running SMF 2.0.14 / Tinyportal 1.2R Beta

Offline lurkalot

  • Sr. Member
  • ****
  • Posts: 883
  • Gender: Male
  • Tinyportal Support
    • guitaristguild on Facebook
    • Tinyportal on GitHub
    • @GuitaristGuild on Twitter
    • Guitarist Guild
Re: Patching to 2.0.14 test failed on custom theme.
« Reply #5 on: May 15, 2017, 05:28:57 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.  ;)

Tinyportal.net Official Support Site For TinyPortal.
Camera Craniums Running SMF 2.0.13 / Tinyportal 1.2
Guitarist Guild Running SMF 2.0.14 / Tinyportal 1.2R Beta

Offline lurkalot

  • Sr. Member
  • ****
  • Posts: 883
  • Gender: Male
  • Tinyportal Support
    • guitaristguild on Facebook
    • Tinyportal on GitHub
    • @GuitaristGuild on Twitter
    • Guitarist Guild
Re: Patching to 2.0.14 test failed on custom theme.
« Reply #6 on: May 16, 2017, 04:01:58 PM »
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.

Tinyportal.net Official Support Site For TinyPortal.
Camera Craniums Running SMF 2.0.13 / Tinyportal 1.2
Guitarist Guild Running SMF 2.0.14 / Tinyportal 1.2R Beta

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 67,176
    • Arantor on GitHub
Re: Patching to 2.0.14 test failed on custom theme.
« Reply #7 on: May 16, 2017, 04:03:07 PM »
All themes need updating now.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen your role in this, and now I must choose mine.

Offline lurkalot

  • Sr. Member
  • ****
  • Posts: 883
  • Gender: Male
  • Tinyportal Support
    • guitaristguild on Facebook
    • Tinyportal on GitHub
    • @GuitaristGuild on Twitter
    • Guitarist Guild
Re: Patching to 2.0.14 test failed on custom theme.
« Reply #8 on: May 16, 2017, 04:12:00 PM »
All themes need updating now.

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

Tinyportal.net Official Support Site For TinyPortal.
Camera Craniums Running SMF 2.0.13 / Tinyportal 1.2
Guitarist Guild Running SMF 2.0.14 / Tinyportal 1.2R Beta

Offline PPI Karl

  • Newbie
  • *
  • Posts: 2
Re: Patching to 2.0.14 test failed on custom theme.
« Reply #9 on: May 20, 2017, 12:48:16 PM »
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?
Code: [Select]
<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.

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 18,958
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Patching to 2.0.14 test failed on custom theme.
« Reply #10 on: May 20, 2017, 01:05:17 PM »
in your themes index.template.php look BEFORE the </form> tag add
Code: [Select]
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
« Last Edit: May 20, 2017, 01:29:21 PM by vbgamer45 »
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

Offline PPI Karl

  • Newbie
  • *
  • Posts: 2
Re: Patching to 2.0.14 test failed on custom theme.
« Reply #11 on: May 20, 2017, 01:09:16 PM »
Thank you! :)

Offline lurkalot

  • Sr. Member
  • ****
  • Posts: 883
  • Gender: Male
  • Tinyportal Support
    • guitaristguild on Facebook
    • Tinyportal on GitHub
    • @GuitaristGuild on Twitter
    • Guitarist Guild
Re: Patching to 2.0.14 test failed on custom theme.
« Reply #12 on: May 20, 2017, 01:13:52 PM »
in your themes index.template.php look after the </form> tag add
Code: [Select]
<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.

Tinyportal.net Official Support Site For TinyPortal.
Camera Craniums Running SMF 2.0.13 / Tinyportal 1.2
Guitarist Guild Running SMF 2.0.14 / Tinyportal 1.2R Beta

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 67,176
    • Arantor on GitHub
Re: Patching to 2.0.14 test failed on custom theme.
« Reply #13 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...
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen your role in this, and now I must choose mine.

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 18,958
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Patching to 2.0.14 test failed on custom theme.
« Reply #14 on: May 20, 2017, 01:30:29 PM »
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

Offline lurkalot

  • Sr. Member
  • ****
  • Posts: 883
  • Gender: Male
  • Tinyportal Support
    • guitaristguild on Facebook
    • Tinyportal on GitHub
    • @GuitaristGuild on Twitter
    • Guitarist Guild
Re: Patching to 2.0.14 test failed on custom theme.
« Reply #15 on: May 20, 2017, 02:18:05 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.

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.

Tinyportal.net Official Support Site For TinyPortal.
Camera Craniums Running SMF 2.0.13 / Tinyportal 1.2
Guitarist Guild Running SMF 2.0.14 / Tinyportal 1.2R Beta

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 67,176
    • Arantor on GitHub
Re: Patching to 2.0.14 test failed on custom theme.
« Reply #16 on: May 20, 2017, 02:28:20 PM »
Either add it in after the starting <form> or before the closing </form> would work :)
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen your role in this, and now I must choose mine.

Offline lurkalot

  • Sr. Member
  • ****
  • Posts: 883
  • Gender: Male
  • Tinyportal Support
    • guitaristguild on Facebook
    • Tinyportal on GitHub
    • @GuitaristGuild on Twitter
    • Guitarist Guild
Re: Patching to 2.0.14 test failed on custom theme.
« Reply #17 on: May 20, 2017, 02:42:09 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

Tinyportal.net Official Support Site For TinyPortal.
Camera Craniums Running SMF 2.0.13 / Tinyportal 1.2
Guitarist Guild Running SMF 2.0.14 / Tinyportal 1.2R Beta

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 67,176
    • Arantor on GitHub
Re: Patching to 2.0.14 test failed on custom theme.
« Reply #18 on: May 20, 2017, 02:51:12 PM »
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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen your role in this, and now I must choose mine.

Offline ForumGuy789

  • Jr. Member
  • **
  • Posts: 143
Re: Patching to 2.0.14 test failed on custom theme.
« Reply #19 on: May 20, 2017, 10:52:42 PM »
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.
« Last Edit: May 20, 2017, 11:03:31 PM by ForumGuy789 »