syntax error, unexpected '<'

Started by Neres, December 18, 2018, 10:50:52 AM

Previous topic - Next topic

Neres

Installed SMF 2.0.15.

Installed the 'dark modern' theme.

Suddenly, I couldn't login from front page. Every time I tried logging in, it gave me this:
QuoteYour session timed out while posting. Please go back and try again

So I was digging around and found this:
https://wiki.simplemachines.org/smf/Login_error_2.0.14
QuoteSMF 2.0.14+ now requires the a session check in the <form> for the login function. If your custom theme has a login form, such as in index.template.php, boardindex.template.php or login.template.php, you will need to modify the theme to allow the login function to work correctly. In order to modify the theme, add the following code along with the other "hidden" input types, or anywhere before the closing </form> tag in the login form.
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />

But when I did that, just adding that line before the closing </form> tag and saved it the whole thing just broke and my  SMF forum is giving me this:

QuoteTemplate Parse Error!
There was a problem loading the /Themes/darkmodern202/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
syntax error, unexpected '<'


So I want to go back and revert it - but I can't. Can someone enlighten me as to how to go back and revert without having to reinstall the entire forum?

When clicking on:
Quoteaccessing the file directly
Which is a link to:
/forums/Themes/darkmodern202/index.template.php
I'm getting this:
QuoteSorry, that didn't work.
Please try again or come back later.
500 Error. Internal Server Error.

Someone help mehhh!!!

vbgamer45

Attach your modified index.template.php
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

Neres

Quote from: vbgamer45 on December 18, 2018, 11:13:03 AM
Attach your modified index.template.php

I can't access it.

Do you think it's possible to access it through my Cpanel (hosting company) and change it from there?

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

Neres

As an update - I was able to access the modified index.template.php and revert it back to normal. Which is good news my forum is back online again.

But I'm still perplexed about the line of code suggested to eliminate the original issue - which is still persistent.

vbgamer45

The line of code was not added right Updated file attached
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

Neres

I uploaded your modified version which seems to have the line there - but unfortunately the original problem still happens. I still can't login using the main page login screen, I'm forced to use the login tab instead.

vbgamer45

Ah, I see you had it wrong spot try this file
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

Neres

Thank you vbgamer45!!!

It all works now perfectly thank you so much sir!

Is there a possible breach that can happen due to the fact that index.template.php of my forum is uploaded here?

Illori


Neres


Advertisement: