-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempt to assign property "elapsed" on null #18
Comments
Hello, I have the very same issue, I also posted it on the plugin page in moodle let's hope they can provide a solution because this plugin was really useful. Please if you find any workaround or fix let me know |
Hi guys ! |
Hello, the problem is that we are currently having a bunch of students connecting to our moodle platform and if debugging affects what they see on screen might be a bit of an issue. One thing I checked is an "older" moodle isntalation that is running moodle 4.0.1 and is using an old version of the plugin "2017090600". In that moodle installation the plugin works, at least the course does not crash. However, when installing the very same version of the plugin into our newer moodle installation it does crash. This time instead of complaning about the "elapsed" variable it complains about the "startsession" or something like that. I'm not sure what's going on because I just updated the plugin version into the older moodle installation and it still works. At this point I'm not sure what's causing the issue to be honest I thought I could reproduce the issue in an older installation of moodle 4.0 that we not use currently but looks like we cannot do that either. Do you know by any chance if debug mode can be enable just for a particular course? |
Hello again, I was able to quickly enable the debugging to get the error and disable it. This is with the old version of the plugin 2017090600 Here's what it said: Error
Here's what it says with the version for moodle 4.0: Error
I also see that when installing the plugin for the 4.0 it gives a warning about some english language values being null "Multiple English language files found [null]" |
Hello again, were you able to check the trace I sent you? Also could you please fix it for the 4.0.X moodle version as currently we are not able to update to 4.2 Thanks! |
Hello, did you find anything in the trace? We need to generate a few reports in Moodle and one of them is the detailed view of the use_stats block. Thanks a lot for your help! |
Can you confirm me your php version ? Seems it's a behaviour change in php 8.0) |
Hello there, the exact php version for our moodle site is 8.0.30. Looks like that's the issue, the older installation we had was running version 7.4.33 and as soon as I switched to version 8 it crashed |
Hello again, there's one thing I don't understand, I went back and use php 7.4.33 in our "newer" moodle installation. The course does not crash, however, the "show details" link does not appear, did you remove that from the plugin in newer versions? Thanks in advance! |
Hello, same issue here, after installing use_stats on a server running PHP 8.0.30 I keep getting the "Exception - Attempt to assign property "elapsed" on null" error message. Is there any fix or solution yet? Thanks |
=> ablancoTadel : Can you pick the line number ? there should be some dispatched cases of php 8.0 fixes to add to code to pass new coding constraints. |
Hello again, the error is thrown at line 423 of use_stats/locallib.php and at line 161 of use_stats/block_use_stats.php when calling to use_stats_aggregate_logs. |
I fixed it by adding some lines of code, for example, from PHP 8.0 std class variables need to be initialized before accessing a property. Now the problem is that the use stats block along with trainingsessions are returning a lot more time than they should. |
=> ablanco |
Hi, Error |
Hi, as far as I know there isn't any fix yet, I had to go back to php 7.4 because I'm currently using moodle 4.1 and this version doesn't require php 8, so my recomendation would be, at least for now, go back to Moodle 4.1. |
thanks for your message |
I tried to update my moodle and this error appeared. Excepción - Attempt to assign property "elapsed" on null Error code: generalexceptionmessage line 414 of /blocks/use_stats/locallib.php: Error thrown |
Can you tell me how exactly you solved it so I can do it myself? and whether to propose a PR if possible |
Hi I have sole issues when i add a block in a course on Moodle 4.2. I have this error message « Attempt to assign property "elapsed" on null « on an error page and i can open the course it become unusable. I must uninstall the plugin to regain access to the corrupted course. Any ideas to what’s happening ?
The text was updated successfully, but these errors were encountered: