Chat not opening - Urgent Help

Chat not opening - Urgent Help

by Jagadhisha Gowda S N -
Number of replies: 1

I have recently upgraded my moodle to 4. When i click on chat it doesn't open. I have backup and when i run that in my local it is working fine but the same code on our site isn't working. Below is the error that comes when i click chat button

Uncaught TypeError: Cannot read properties of null (reading 'attr')

    at first.js:2115:2423

    at show (first.js:2115:2444)

    at String.changeRoute (first.js:1999:1181)

    at Object.go (first.js:1999:1864)

    at show (first.js:1811:3054)

    at first.js:1811:5436

    at first.js:562:684

    at Array.forEach (<anonymous>)

    at _exports.publish (first.js:562:656)

    at HTMLAnchorElement.<anonymous> (first.js:2025:725)

Average of ratings: -
In reply to Jagadhisha Gowda S N

Re: Chat not opening - Urgent Help

by ravida marcos -
It seems like there is an issue with the JavaScript code in your Moodle site, specifically in the "first.js" file. The error message indicates that the code is trying to read a property of a null object, which is causing the TypeError.

Without more information about the specific code in the "first.js" file, it's difficult to provide a specific solution. However, there are some general steps you can take to try and resolve the issue:

Clear your browser cache and cookies and try again. Sometimes browser cache or cookies can cause issues with JavaScript code.

Check the code in the "first.js" file and see if you can identify any potential issues. Look for places where the code is trying to access null objects or properties.

Make sure that all the necessary JavaScript files are being loaded correctly. Check the HTML source code of the page to ensure that all the required files are being included.

If you have recently upgraded Moodle, check to make sure that all the necessary plugins and modules are up-to-date and compatible with the new version of Moodle.

If none of the above steps work, try restoring your site from a backup and see if the issue persists. If it does, you may need to seek help from Moodle support or a web developer with experience in Moodle.
Average of ratings: Useful (1)