Invalid login, please try again after upgrade from 3.5.10 to 3.6.8

Invalid login, please try again after upgrade from 3.5.10 to 3.6.8

Aristotelis Gorgias -
回帖数:12

Hello all,

I have created an identical copy of our production instance to my local environment running XAMPP and I am trying to do the following:

After upgrading Moodle from 3.5.10 to 3.6.8 and restoring all plugins etc. I am unable to login. Before upgrading to 3.6.8, I had already performed the following upgrades,

3.4.1 -> 3.4.9

3.4.9 -> 3.5.10

and everything worked fine during those 2 upgrades. I followed exactly the recommended upgrading method as described in moodle's docs.

After successfully upgrading to 3.6.8, I successfully passed the step about the server requirements for the correct php mysql and db versions, I then successfully passed the next step as well for upgrading the database and made sure that all the plugins are fine and had no errors (just some warnings about a few plugins that can be updated to newer version) and after that step finished too, I then got back to the /admin/index.php screen asking me to login. That seemed weird to me because during the previous updates, it never asked me to login after completing the upgrading, but I said, ok. i'll just login. So after trying to login i am constantly getting the message "Invalid login, please try again"

I have tried almost anything here and by anything I mean the following.

First of all, I checked my hashed password in the local database and it is exactly the same with my hashed password in production database.

I then read an article that from moodle 3.1 the logintoken was introduced and since we use the mb2nl theme, I supposed that I just have to add the new input hidden field for this logintoken to the login form but the field was already there and again that was not the issue. 

I am at a point where I cannot think of what else might be wrong and I am stuck.

A few more information about our whole setup, we have a Joomla website and our moodle users are actually coming from Joomla, Therefore we use a plugin named Joomdle which connects these 2 CMSs. Our users register to our Joomla website and the Joomdle plugin sends the credentials to moodle and the user is being created to the moodle CMS as well and an entry is being created in the moodle's "user" table. The difference is that moodle generates a different hashed password from the hashed password that joomla does. Anyway, there were no problems at all with logins or anything else since I tried logging in with multiple user accounts and all worked fine, before upgrading to version 3.6.8. Registrations from moodle directly are prohibited and what I am thinking is that one thing that might be the cause could be Joomdle but I am not sure and this is why I desperately need some help from experts.

Any help will be highly appreciated.

Best regards, Aristotelis.

回复Aristotelis Gorgias

Re: Invalid login, please try again after upgrade from 3.5.10 to 3.6.8

Howard Miller -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像
Isn't Joomoodle something you pay for? Isn't support of some sort provided?
回复Howard Miller

Re: Invalid login, please try again after upgrade from 3.5.10 to 3.6.8

Aristotelis Gorgias -
Hello and sorry but your reply seems like "an easy getaway". This is not a Joomdle issue afterwards since I already checked this by completely removing Joomdle and this is not the cause. This is probably coming from moodle core but since moodle has NO error reporting or logging at all, I really cannot understand what this is.

To exclude one more matter, I already checked and made sure that moodle's password salt is the same both in production and local environments.
回复Aristotelis Gorgias

Re: Invalid login, please try again after upgrade from 3.5.10 to 3.6.8

Emma Richardson -
Documentation writers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像
What kind of account are you trying to log in with? Is it a local one? Have you tried a password reset?
回复Emma Richardson

Re: Invalid login, please try again after upgrade from 3.5.10 to 3.6.8

Aristotelis Gorgias -
The account i am trying to login with is an administrator account with full privileges.
回复Aristotelis Gorgias

Re: Invalid login, please try again after upgrade from 3.5.10 to 3.6.8

Howard Miller -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像
It's not what Emma asked you. Can you confirm that this is a local/manual account?

While you shouldn't use an external account for an administrator, you can so people do.
回复Aristotelis Gorgias

Re: Invalid login, please try again after upgrade from 3.5.10 to 3.6.8

Howard Miller -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像
"since moodle has NO error reporting or logging at all"

Really? Debugging, Logs

I understand you are frustrated by your problem, but you still need to be nice 眨眼
回复Howard Miller

Re: Invalid login, please try again after upgrade from 3.5.10 to 3.6.8

Aristotelis Gorgias -
I'm sorry if I seemed frustrated. It's the way my written-speech looks like sometimes. 微笑

How can I enable debugging when I don't have access to the admin panel?

"To enable debugging, go to Site administration > Development > Debugging." this isn't going to work for me since I cannot login.
Also, about the Logs as well, everything that's written in the article you linked in your reply is referring to actions made via the Administration section which again, I cannot access since I cannot login.

So, is there a way to have actual logs of moodle's CMS in a log txt file? Is there a way to enable debugging via the config.php file or anything?
回复Aristotelis Gorgias

Re: Invalid login, please try again after upgrade from 3.5.10 to 3.6.8

Howard Miller -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像
If you read this - Debugging - it will tell you how to enable debugging in your config.php file. In short, search for the debugging section in config-dist.php and copy (and uncomment) the relevant lines into config.php.

It's well worth a try - some error/warnings may appear either in the browser or in the web server's error log.
回复Howard Miller

Re: Invalid login, please try again after upgrade from 3.5.10 to 3.6.8

Aristotelis Gorgias -
I'm still working on this issue. Thank you for all your replies. I will get back to you as soon as I have more to report.
回复Howard Miller

Re: Invalid login, please try again after upgrade from 3.5.10 to 3.6.8

Aristotelis Gorgias -
I just found what the cause is of not being able to login. I just checked my user account in the database and in the "auth" column it had joomdle. I changed it to manual and I can now login. So i'll now have to figure out what's wrong with joomdle authentication and why it's not letting me login. I will apply all these updates in production as well and it wouldn't be wise to change the auth from joomdle to manual for all users to be able to login I guess. :S
回复Aristotelis Gorgias

Re: Invalid login, please try again after upgrade from 3.5.10 to 3.6.8

Howard Miller -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像
A gentleman wouldn't quote the bit where you said it was nothing to do with Joomoodle 眨眼

If you haven't done it already, it's still a good move to enable debugging in a situation like this.
回复Aristotelis Gorgias

Re: Invalid login, please try again after upgrade from 3.5.10 to 3.6.8

Ken Task -
Particularly helpful Moodlers的头像

Qualifications for this response and advice ... a former joomoodle/joomla admin/user ...

Your discovery means you used another tool to view tables in moodle ... the mdl_user table.

Go back to viewing that table and you will note (or should note) user id 1 is guest and auth is manual.  User ID 2, unless you changed, is 'admin' and auth is manual.   Those two accounts in Moodle need to remain manual for reasons such as the snafu you are experiencing now.

It is hoped, you can navigate directly to the moodle site login screen and use the username/pass form in the left panel of that screen to login as 'admin'.

Advise you create another account in moodle and set it also to manual auth as well as site Admin.

*Never* change those.  You have multiple accounts both in Joomla and in the Moodle to be able to test things  Confusing for admin level users.

In looking over joomoodle's wiki I saw where in config of the plugin there are supposed to be 'test links'.  One in Moodle and one in Joomla's admin panel.

Please see: https://www.joomdle.com/wiki/Main_Page

Comment: one of the reasons I got away from using .... updates/upgrades to either the Joomla or the Moodle would cause such issues as you are facing now ... and always at a very bad time.   Learned to check both the wiki + plugins for Moodle for compatibility and/or issues prior to pulling the trigger on updating Moodle and/or Joomla.   And a note about that ... me thinks security of Moodle perhaps a little better than Joomla ... one can get away with a Moodle less than latest/greatest where as in Joomla ... more like a 0 day flaw in Windows ... better get the updated version in Joomla.  Nice thing about Joomla 3+... it's admin side has the ability to update the Joomla inside the joomla.  Moodle has no tool for such but by far using git to do command line only updates/upgrades to the core Moodle code ... not the joomoodle addons, is the best way to go ... that's if one has access to ssh/shell and not afraid/adverse to a little command line 'foo'.

Best of luck!

'SoS', Ken