Logged out while in maintenance mode. How can I log back in now?

Started by landyvlad, July 19, 2018, 06:36:16 AM

Previous topic - Next topic

landyvlad

How can I log in, given I am an admin, since the forum is in maintenance mode?

Yeah I know....

Please rescue me !
"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

If it's in the kind of maintenance mode that you still get a theme, log in as an admin - you can still do that.

If it's the kind of maintenance mode you can't set through the admin panel and you get no theme loaded, edit Settings.php and change $maintenance from 2 to 1 and then log in. Though if it's set to 2, something is broken.

landyvlad

With maintenance mode set manually in settings.php to 1 I get a white screen with simply this:
QuoteMaintenance Mode
We are doing some forum updates. Please check back periodically. We'll be as soon as possible, we promise ! Cheers Admin.

There is no login box or theme or any such thing.

With maintenance mode set manually in settings.php to 0 I get the them and showing the login box etc.
If I then enter username and password and click login, I get:

QuoteTemplate Parse Error!
Something seems to have gone wrong with the template system on the forum. This problem should only be temporary so please come back later and try again. Please contact the administrator if you continue to see this message.

You can also try refreshing this page.

naturally refreshing does nothing useful.
"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

For completeness sake I note that the reason I was in maintenance mode to begin with was to follow these instructions, which I did:
https://www.simplemachines.org/community/index.php?topic=496394.msg3980142#msg3980142

just in case that's relevant.


"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.

Gary

Well, a parse error can't really be diagnosed without being told what the error is, but normally you see those as an admin, so since you're not logged in, it'd have to be a crapshoot.

So do attach the modified Login.template.php
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

landyvlad

I have attached a copy of (ignore the title) the actual login template.php from my forum, (which cam from what Gigawatt posted in the linked thread) and it appears that there is a syntax error in line 74 "unexpected T_LOGICAL_AND

How should I amend this please?

(I tried commenting out that line but that just caused an error on the following line) so I;ve put it back to as per the attached file (above) for now.


P.S. Don;t you hate forum members whinging like children when its unavailable for a while? Jeez.

Edit: Snap ! Was writing this post when you posted Gaz :)

Supplementary question - are any changes made to the login.template.php from the install pack, simply when setting up the forum (not including any mods?).  That is to say, would simply using the fresh file work?
"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 I have now made it the clean login.template.php from the install pack.

At least log in seems possible now.

If someone could just clarify please:
Quotere any changes made to the login.template.php from the install pack, simply when setting up the forum (not including any mods?)
"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.

SychO

Try this, see if you get any errors, and report back, keep in mind I have no idea what the manual changes you made are for, I only fixed the parsing issue you're facing.
Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze

Aleksi "Lex" Kilpinen

Not sure I understood you correctly, but no - the templates from the installation pack are not touched during or after installation, unless you install a mod or a relevant update.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

landyvlad

Sycho - thanks. I'll have a look so I can learn stuff :)

The use of the clean stock SMF file seems to have done the job for now.
"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.

Illori

if you had mods installed that file may cause you issues if they modified that same file.

Gary

1. Please do not call me 'Gaz' I know it's in my username and all, but it's a name I associate with my family, and as such I only allow family to use it. I did used to allow friends as well, but I stopped when I left school, which was after my username's creation. I normally use my real first name as seen in my signature, and will change it back in a few months, I'm currently honouring my 15 years since the names creation. ;)

2. I had a look at SychO's fix and it was exactly what I would've suggested on line 74 you had the word 'and' but it was in a place when PHP code should've been used such as an if statement. He changed it to an echo which was appropriate, though removing both that and the '; on line 72 would've also done the same thing.
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

Arantor

Using "and" instead of "&&" in an IF statement is legal PHP, as is using the word "or" instead of "||"

Gary

I'm aware of that. But there, the word 'and' was exclusively by itself, there was no literally other content on that line.

<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'], '" />';

and
<input type="hidden" name="hash_passwrd" value="" />
</div>
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

Arantor

And it would still be invalid even if the word and were removed in that sample because it would then plough into the HTML and see a different error...

Gary

Indeed. Which is why SychO's fix was to replace it with an echo' ;)
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

GigaWatt

Quote from: Gazmanafc on July 19, 2018, 11:25:09 AM
2. I had a look at SychO's fix and it was exactly what I would've suggested on line 74 you had the word 'and' but it was in a place when PHP code should've been used such as an if statement. He changed it to an echo which was appropriate, though removing both that and the '; on line 72 would've also done the same thing.

That was probably my bad, I followed what was supposed to be changed in the Social Login manual uninstall (the test failed), so I patched the file manually per the uninstall error (search an replace) and uploaded it in this post with instructions on how the OP should remove the Social Login mod. The mod was made before the 2.0.14 login fix, so it couldn't recognize the added line for the login fix and thus returned an error :S.

Again, I'm sorry for the inconvenience landyvlad :S.

Though if you look at this post, you can clearly see that the uninstaller was actually trying to add an "and" at the end of the code ???. Am I mistaken?
"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?"..."

Arantor

Yes, that's just the closing code tag was put in the wrong place in the post, because it's meant to indicate two sets of code edits.

GigaWatt

Oh :)... I think I got it now... the "and" wasn't even part of the code that was supposed to be edited, it was just an indicator to link that there is more than one code edit, right :)?
"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?"..."

Arantor


Advertisement: