Re: Moodle 3.5 Fordson v3.5 release 3 update 15 (2018111300)
It worked ok for me!
Re: Moodle 3.5 Fordson v3.5 release 3 update 15 (2018111300)
Hi...
I think I spoke too soon as after installing Fordson I got this message!!!
That's not a good start...
Mary
Re: Moodle 3.5 Fordson v3.5 release 3 update 15 (2018111300)
Hallo! After Frodson update I have the same problem and could not log in the system!!!
error:
Exception - Call to undefined method core\session\manager::get_login_token()
Re: Moodle 3.5 Fordson v3.5 release 3 update 15 (2018111300)
Re: Moodle 3.5 Fordson v3.5 release 3 update 15 (2018111300)
Hello,
same problem! Moodle Moodle 3.5 (Build: 20180517)
Fehler: Call to undefined method core\session\manager::get_login_token()
Re: Moodle 3.5 Fordson v3.5 release 3 update 15 (2018111300)
Upgrade to Moodle 3.5.3 if you are using the latest release (Update 15) of Fordson.
The latest version of Fordson includes a function that was put into Moodle core and requires login tokens in Moodle 3.5.3.
There are 2 ways to solve this. I'll provide both options and you can choose:
- Upgrade to Moodle 3.5.3 will simply fix everything as Update 15 of Fordson is designed to work with the new token login introduced in Moodle 3.5.3.
- Revert back to the previous version of Fordson. Moodle doesn't like going backwards so you will need to edit the fordson/version.php file to "trick" moodle into thinking it's installing a newer version. Edit the line that begins with this: $plugin->version = 2018111300; and change it to a slightly higher number like this: $plugin->version = 2018111301;
Many users were reporting yesterday that they could no longer login to Moodle after upgrading to 3.5.3. We rushed to implement the new token login and release a fix. Unfortunately if you did not upgrade moodle but upgraded Fordson this created a dilemma.
I pulled down the rushed login fix and put up a new version of fordson which will now require that you have Moodle 3.5.3 installed in order to update. Sometimes there are unintended consequences that arise from trying to fix one issue only to create another. It should be all worked out now.
Re: Moodle 3.5 Fordson v3.5 release 3 update 15 (2018111300)
There is a third option, use 'method_exists': secure.php.net/manual/en/function.method-exists.php as a wrapper where the method is called.
Re: Moodle 3.5 Fordson v3.5 release 3 update 15 (2018111300)
Fourth option: Check the Moodle version number in $CFG global and only call if the version will have the method.
Re: Moodle 3.5 Fordson v3.5 release 3 update 15 (2018111300)
Bingo. This is exactly what I just did this morning as it seemed like the best way forward.
The 3.5 version of Fordson's latest release now requires Moodle 3.5.3. In a rush to try and help those who couldn't login I missed that the new token integration would cause problems for those who do not update Moodle but update Fordson.
If you do not update Moodle to 3.5.3, then the highest version of Fordson you can use is update 13.
Everything moving forward will require the login tokens and at least Moodle 3.5.3.
Re: Moodle 3.5 Fordson v3.5 release 3 update 15 (2018111300)
This has wasted a lot of people's time, Chris. Had you added the correct version of Moodle in the Fordson version.php then this would have alerted us all to upgrade.
Re: Moodle 3.5 Fordson v3.5 release 3 update 15 (2018111300)
Sorry, Mary. Accidents happen. It's there now. I don't know what else you want me to do.
This change in the logins affects a lot of moodle sites and there will be a wave of people who cannot login after upgrading to Moodle 3.5.3 and using other themes. It affects any of the themes that override Boost login mustache templates and/or generate a custom login block built into the homepage. Moove comes to mind, Adaptable might be affected, several other themes where there is a special login will require this update.
My inbox blew up yesterday with people who could no longer login after upgrading to Moodle 3.5.3. I attempted to fix the problem and in the rush to help I should have realized to change the requirement to Moodle 3.5.3. I didn't do so until this morning. It is now fixed.
I will do my utmost best to not waste any more of your time. Geez. I'm guessing you don't think I am beating myself up for missing that one.
Re: Moodle 3.5 Fordson v3.5 release 3 update 15 (2018111300)
Chris, May be I can reinstall Fordson plugin with older version (untill 08 Nov 2018) Could you please upload it because in the plugins there current version "Moodle 3.5 Fordson v3.5 release 3 update 15" maybe Moodle 3.5 Fordson v3.5 release 3 update 13 is ok ?
And how can I return an older version ? There is no 'delete' button in the plugin section for Fordson
Re: Moodle 3.5 Fordson v3.5 release 3 update 15 (2018111300)
Denis,
The previous versions are here: https://moodle.org/plugins/pluginversions.php?plugin=theme_fordson
The current versions are at the top of the page but if you scroll down you can see all the previous versions.
Hope that helps.
Chris
Re: Moodle 3.5 Fordson v3.5 release 3 update 15 (2018111300)
Or don't bother downgrading and instead edit 'theme/fordson/classes/output/core_renderer.php' line 656 in update 15 and change:
$logintoken = \core\session\manager::get_login_token();
to:
if(method_exists('\core\session\manager', 'get_login_token')) {
$logintoken = \core\session\manager::get_login_token();
} else {
$logintoken = '';
}
Solution based upon my 'method_exists' proposal in a previous post and confirmed in an eMail to me and other theme designers.
Re: Moodle 3.5 Fordson v3.5 release 3 update 15 (2018111300)
Hey Gareth,
I tried implementing your idea and it worked for my custom login form on the Site Homepage. However, on moodle's actual login page moodle/login/index.php I was getting the error there too. On those mustache pages I copied the code from Boost templates:
<input type="hidden" name="logintoken" value="{{logintoken}}">
It threw a mustache error I believe. I was working on that for awhile but kinda gave up as we are trying to prepare for the Moodle 3.6 release.
Mainly this stemmed from the fordson/templates/core/loginform.mustache file on line 118
and line 230
What I was thinking I needed but didn't do was add this:
{{#logintoken}}<input type="hidden" name="logintoken" value="{{logintoken}}">{{/logintoken}}
Then I could release a version that finally fixes this whole mess for any version of Moodle 3.5.
Re: Moodle 3.5 Fordson v3.5 release 3 update 15 (2018111300)
Ok Chris,
What was the mustache error? And:
{{#logintoken}}<input type="hidden" name="logintoken" value="{{logintoken}}">{{/logintoken}}
should work.
And with "However, on moodle's actual login page moodle/login/index.php I was getting the error there too." what is the error and stack trace of it please?
Re: Moodle 3.5 Fordson v3.5 release 3 update 15 (2018111300)
Hi Chris,
Ok with the patch detailed above in update 15 on '/login/index.php?theme=fordson' page on Moodle 3.5.2+ (Build: 20181023) with the theme requires set back to:
$plugin->requires = 2018051700;
I don't get an error bar:
Notice: Trying to get property of non-object in F:\moodledev\moodlegjb\theme\fordson\lib\fordson_lib.php on line 133
on the screen and:
PHP Notice: Undefined property: stdClass::$showcustomlogin in F:\moodledev\moodlegjb\theme\fordson\lib\scss_lib.php on line 225
in the php error log file.
The 'value' of 'logintoken' is empty, i.e:
<input type="hidden" name="logintoken" value="">
Gareth
Re: Moodle 3.5 Fordson v3.5 release 3 update 15 (2018111300)
I discovered I had a faulty dev site. Rebuilding my 3.5.2 setup because I had weird things happening.
Re: Moodle 3.5 Fordson v3.5 release 3 update 15 (2018111300)
I fixed this and tested it on both 3.5.3 and 3.5.2 and it looks like a winner! Thank you.
I think Moodle.org is still having issues because when I go to publish the update it has the "required version" field in the form hidden.
Download the latest on github if it is a pressing issue for your site:
Re: Moodle 3.5 Fordson v3.5 release 3 update 15 (2018111300)
Or use 'method_exists' or a $CFG Moodle version check and support both M3.5.3 and M3.5.3- in the same code!
Re: Moodle 3.5 Fordson v3.5 release 3 update 15 (2018111300)
Hi Chris,
I am quite new to the Moodle and development community process.
I too am getting the error "Call to undefined method core\session\manager::get_login_token()" and cannot log in
This happened when I upgraded to the latest version of the Adaptable theme. So I am guessing the issue was trigger by adaptable theme?
My moodle version is still on 3.5.2
My question is What is easiest way and least complicated way to fix this issue.. knowing I still probably need to upgrade to 3.6..
The whole upgrade process seem daunting process and I will prefer if I can do while my current moodle is operational.
thanks
Peter