This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

slicer

  • ****
  • 204 posts
Bug with preview items Stela
« 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:
Code: [Select]
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




Have a good one!

*

MB Themes

Re: Bug with preview items Stela
« Reply #1 on: February 05, 2018, 11:30:41 AM »
@slicer
Go to file:
oc-content/plugins/online_chat/js/user.js

to line #2 add code:
Code: [Select]
  if (typeof ocUserId === 'undefined') {
    var ocUserId = 0;
  }
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

slicer

  • ****
  • 204 posts
Re: Bug with preview items Stela
« Reply #2 on: February 05, 2018, 10:12:05 PM »
@slicer
Go to file:
oc-content/plugins/online_chat/js/user.js

to line #2 add code:
Code: [Select]
  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
Code: [Select]
$(document).ready(function(){
 if (typeof ocUserId === 'undefined') {
    var ocUserId = 0;
  }


RESULTS:



CONSOLE:







*

MB Themes

Re: Bug with preview items Stela
« Reply #3 on: February 05, 2018, 10:15:22 PM »
Code: [Select]
  if (typeof ocUserId === undefined) {
    var ocUserId = 0;
  }


try it like this...
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

slicer

  • ****
  • 204 posts
Re: Bug with preview items Stela
« Reply #4 on: February 06, 2018, 01:49:27 AM »
Code: [Select]
  if (typeof ocUserId === undefined) {
    var ocUserId = 0;
  }


try it like this...

Same results!  :P   Same error in console!  ;D

Marked as best answer by slicer on February 06, 2018, 02:48:32 PM
*

MB Themes

Re: Bug with preview items Stela
« Reply #5 on: February 06, 2018, 08:23:58 AM »
@slicer (have you cleaned cache of it?)
Ok, in index.php
Code: [Select]
osc_add_hook('footer', 'oc_js');
change to:
Code: [Select]
osc_add_hook('header', 'oc_js');
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

slicer

  • ****
  • 204 posts
Re: Bug with preview items Stela
« Reply #6 on: February 06, 2018, 02:49:24 PM »
YES flawlessly ^_^ and I was clearing all data in browser just in case.