DLE CMS news raiting function didnt works - javascript

I stared do template on DLE CMS. I do that first time but it looks pretty easy. Now i have a trouble. I turned on standart rating system from DLE CMS into file fullstory.tpl (standard single news page). Design looks well, but if i try to click some stars to rate news, i get error "Uncaught ReferenceError: doRate is not defined" into my console. I understand that i dont have this function doRate on this page. But how to make it work fine? I found this function in other teplate into dle_js.js file. What this file mean and how i must to add it into my template. Thanks!


Issue with Google Tag Manager implementation. "Uncaught TypeError: Wb.set is not a function"

Recently I started having Issues with the Google Tag Manager.
I can't track it to a Tag or a Trigger (activated and deactivated individually to check).
The error started occurring this week (no updates were made to the system or template). I noticed when testing the implementation of a new Tag in GTM. That shortly worked but then this error message started showing in the console. Removing the new Tag didn't change the situation and since the code worked for a while (some 30minutes) I don't expect a direct relationship between the new tag and the error.
All I have is the console in the frontend that shows the following error message:
Uncaught TypeError: Wb.set is not a function
The error stems from this file:
Wb is started as a Map just a few steps earlier:
Wb=new Map(Vb.h.F);
The GTM Script is copied and pasted from the GTM-Admin without any change made to it and is included in the header.php file of the Wordpress template. I tried copying it again and replacing the script that was in the header.php previously but the result was the same.
If looking at the actual error message in the console helps, the issue can be seen on the following URL:
Any help in solving this or at least pointer to where to go look for errors would be very much appreciated.
Very interesting, and yes, you're right, the error in the minified code makes no sense:
Let's try something different. First, just export your GTM container (the workspace that is synced with prod/live) as a JSON file in Admin section.
Open the file, look for something like set("style" See if you can find that Wb. Well, don't expect it to be Wb. I guess GTM minifies the code. It may be some weird chat bot, or something like that. From there, you'll be able to find the tag or variable that causes the issue.
I didn't look too deep into it, but that part of code looks sophisticated enough to be a part of the core container code. Actually, we can check it right here, on SO cuz it uses GTM too, let's do that.
Yes, SO has identical code. Looks like it's indeed core GTM. Well, there's a tiny probability that when you built the prod library last time, GTM had an issue and it deployed an artefact.
Try making a new workspace, make a nonsensical change in it and publish it to production. See if it lets you publish. Then see if that fixes the issue.
Now, if it doesn't then the next thing I'd try is trying to re-importing the exported JSON, forcing GTM compare the import to what's there and find differences.
Now if that shows no issues, then I would make a brand new container, load the config in it and try replacing the gtm loading script to see if the error still happens. It sounds like you can do that. If you can't, look a plugin like redirector to redirect the request to a different container.
Still the error with the new container? How about if you load a completely empty container? Got any errors?
There's a very slim chance that your front-end deploys one of a few vars GTM uses too, thus conflicting with your GTM. But it's very unlikely. Why would you use something like google_tag_manager or google_tag_data in the global scope...
If nothing helps and only the empty container doesn't give errors, then... well, then make a list of all tags firing along that error and start disabling them one by one. Or use breakpoints to narrow it down to the tag/library that causes it.

Opencart - cant change js files. adding kind of reddots at the end

firstly very sorry, I cant find out what the real problem is.
I ll try to explain.
My client given code which is developed using opencart and nitropack.
he includes common.js in header, it is basic js file with some ajax calls, UI events etc which has 1297 lines(no formating in code, lots of blank spaces, blank lines etc).
my real problem is, when I made any changes in this file,
the browser console is throwing error invalid or unexpected token.
I checked the common.js file in browser console, seeing that some kind of reddots added at last of the file. I just added a alert() at the begining of file. nothing else.
very sorry, dont know how to explain more detaily.
This is the first time I have seen this kind of issue.
when I removed the alert(), the error gone.

processing web export does not work on the web

I heard the issue of multiple broswsers not supporting web export for processing javaScript. But I tried 3, MS edge, chrome and firefox it does not work in any of them. here is the link for my sketch.
You can also check the source code for the sketch in the same link if you ant to But I am certain that you do not need that step.
My sketch shows you results of the elections of America from 1988 to 2008 and needless to say it is based on inaccurate data. It allows to chose the category of voters and the year.
I tried to add the preloader comment since im using a csv to read data but it still does not work.
preloader comment:
/* #pjs preload="file1.png","file2.png","file3.jgp"; */
First of all, please post your code (as an MCVE) in the post itself.
Secondly, you need to familiarize yourself with the JavaScript console. That's where any errors you're getting will show up. In most browsers you can press the F12 key and then go to the console tab. There you'll see this error:
Uncaught ReferenceError: elections is not defined
So apparently you're using a variable that you haven't defined. Note that the translation process from "Java mode" Processing to Processing.js isn't always smooth, so you might have to look at the generated JavaScript to understand exactly why it's throwing this error.
If you still can't get it figured out, then please post an MCVE that demonstrates the problem. Please note that this should not be your full sketch; it should be just a few lines of code that we can copy and paste to see the same behavior.

PICARD_BRIDGE_CALLBACK variable javascript errors

When javascript errors are occuring on a client of my website, the error will be sent to the server and will be saved into a logfile.
Going through the file there are some cryptic errors, which I can't figure out at all:
Line: 1 ReferenceError: Can't find variable: ____PICARD_BRIDGE_ASYNC_CALLBACK____08597307465970516
Sometimes (but much more rarely) I also got:
Line: 1 ReferenceError: Can't find variable: ____PICARD_BRIDGE_EVENT_CALLBACK____08992069498635828
I am using: Jquery Mobile 1.4.5, Jquery 2.1.4 and the nativedroid 1 library.
On the server I am using Play Framework 2.4
Anybody got an idea what is going on?
I have seen this "cryptic" name PICARD_BRIDGE_ASYNC_CALLBACK as a default name for callback functions in kik.js. You can see examples of this file here and here
This javascript file is probably used in your client. It's used with Kid Cards.

Can't Diagnose jQuery Error: "Object [object Object] has no method"

I'm working on a Wordpress theme and right now I'm trying to get MediaElement to display audio files on posts.
jQuery is loading fine (tested with jQuery alerts) but for some reason MediaElement doesn't want to work. I get the error
'Object [object Object] has no method 'mediaelementplayer','
and although I've double checked everything I just can't figure out what's wrong. If you need a live demo of the problem, check it out here: http://firstpersontheater.net/video/podcast/painkiller-already-episode-78 (please don't judge the theme, I'm working on getting core functionality done first and haven't really started designing yet, haha).
This worked for me with the WordPress plugin:
Had this problem yesterday as well.
MediaElement.js actually includes several different files in the download package. In order to get the full-featured video player you have to include the "mediaelement-and-player.js" file, not the "mediaelement.js" file, which is just the library.
I encountered this same issue.
While I was unable to isolate exactly why this error occurs with the WordPress plug-in implementation of MediaElement.js, I was able to move past it by using the JavaScript of MediaElement only.
I modified the PHP to output the relevant audio and video HTML tags without ID's, and without the script that calls them. I also removed the aspects of the plug-in for cueing scripts, instead linking them myself in my theme.
I then had success calling MediaElement normally using jQuery.
Well what library are you using that adds the api mediaelementplayer? Looks like that plugin either isnt loaded correctly or you are using the API incorrectly.
Quick answer:
You trying to to call a method that does not exits.
var o = {a = 1, b = 2};
It would be nice if it showed what the name of the function you were trying to call was. This happened to me last week and I resolved it by making sure I had linked to the correct JavaScript files.
What you can check is that you are only linking to the libraries you are using, like jQuery, only once. If you link to jQuery and a jQuery extention, then linking to jQuery again will unbind the extension. Causing the above error when you try to call the function you think should exits.