Osclass Support Forums
Osclass plugin support => Online Chat Plugin => Topic started by: slicer on February 03, 2018, 03:10:07 AM
-
Hey @frosticek I found a bug, Online Chat Plugin+Stela Theme.
if you enable Live Chat and clic Preview in the Ad the fuction crashes.
Here is the console error on chrome:
Uncaught ReferenceError: ocUserId is not defined
at HTMLDocument.<anonymous> (user.js:297)
at k (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at Function.ready (jquery.min.js:2)
at HTMLDocument.D (jquery.min.js:2)
This screen is from a clean installation you can reproduce at your end
(https://i.imgur.com/itpyiZU.jpg)
Have a good one!
-
@slicer
Go to file:
oc-content/plugins/online_chat/js/user.js
to line #2 add code:
if (typeof ocUserId === 'undefined') {
var ocUserId = 0;
}
-
@slicer
Go to file:
oc-content/plugins/online_chat/js/user.js
to line #2 add code:
if (typeof ocUserId === 'undefined') {
var ocUserId = 0;
}
Sry It still not working
Here is the final code I got on oc-content/plugins/online_chat/js/user.js
$(document).ready(function(){
if (typeof ocUserId === 'undefined') {
var ocUserId = 0;
}
RESULTS:
(https://i.imgur.com/lJElaRZ.jpg)
CONSOLE:
(https://i.imgur.com/In4VBJ1.jpg)
-
if (typeof ocUserId === undefined) {
var ocUserId = 0;
}
try it like this...
-
if (typeof ocUserId === undefined) {
var ocUserId = 0;
}
try it like this...
Same results! :P Same error in console! ;D
-
@slicer (have you cleaned cache of it?)
Ok, in index.php
osc_add_hook('footer', 'oc_js');
change to:
osc_add_hook('header', 'oc_js');
-
YES flawlessly ^_^ and I was clearing all data in browser just in case.