Having some issues with Buddypress, I have installed nearly every version since 2.7 and I still get the same issue with
Uncaught TypeError: jq.cookie is not a function
I found in the folder
plugins/buddypress/bp-themes/bp-default/_inc
there is a js file called
global.js
first line in this file is
var jq = jQuery;
I realise this is not correct as my jQuery uses $ not jQuery
I tried changing this, however.
console log still shows that its not a found function.
I'm using $. cookies in other javascript. So jQuery cookies are installed.
Also, no matter what i change in this global.js
it still results in the same output as a
# VM31193:1784
in chrome inspector as the original file.
Can anyone help me with this?
Related
I recently upgraded php from 5.6 to 7 and I think it broke CakePHP's DebugKit. On every page I navigate to within my app, the debug_kit javascript file produces an error, specifically when setting the currentRequest. The error is:
ReferenceError: __debug_kit_id is not defined
At first I didn't install sqlite, so I thought that was the issue, but after installing the sqlite, mbstring, and intl extensions the error is still there. I can't seem to find an answer anywhere, most of the problems people encounter with debugkit seem to be solved by installing sqlite.
The code snippet from the debug_kit.js file:
$(document).ready(function() {
toolbar = new Toolbar({
button: $('#toolbar'),
content: $('#panel-content-container'),
panelButtons: $('.panel'),
panelClose: $('#panel-close'),
keyboardScope : $(document),
currentRequest: __debug_kit_id,
originalRequest: __debug_kit_id,
baseUrl: __debug_kit_base_url
});
toolbar.initialize();
Thanks everyone!
This not appear to be a PHP error, but rather a Javascript one because the variable __debug_kit_id is not defined anywhere in your Javascript code. Define it to be something like
var __debug_kit_id = 0;
or whatever value it should have and that will solve your error.
I was able to solve my own problem by removing all remaining php5 packages. I followed bento's answer from this askubuntu question: https://askubuntu.com/questions/59886/how-to-compelety-remove-php and going one by one through the old php5 packages (leaving php7 packages intact). Thanks all
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.
I have a simple problem that I am in search of a solution. I have a JSP that includes jquery-1.10-2. I have verified that it is pulling back the correct version in the Chrome console with $.fn.jquery. I have a script tag in the jsp file that has some jquery functions in it, but I also have included a javascript file that has some regular javascript functions in it as well.
I've moved a jquery function into the included .js file, but I am now getting a '$ is not defined' error from Chrome. Am I not able to mix standard javascript and jquery in one file? For some reason it doesn't appear to be working.
I get this from within Chrome's console:
Uncaught ReferenceError: $ is not defined
amidst all of the POJS in the file, I have put in at the end:
$(function() {
alert("HELLO!");
});
Simple enough of a test to run when the DOM is ready, yet nothing. Can anyone chime in here and give me a hint as to what I am doing wrong?
I checked this SO question: In what ways can I mix jQuery and vanilla JavaScript
From what I gleaned, it shouldn't matter?
I just notice Firefox console outputs the following error for every single .js/.coffee file in my project (even the packages).
-file- is being assigned a //# sourceMappingURL, but already has one
Chrome's console doesn't show anything. I tried deleting all the .map files and clearing Firefox's cache but I'm still getting the errors.
It's a warning (not an error)
and it is a bug (https://bugzilla.mozilla.org/show_bug.cgi?id=1020846 fixed in FF 33)
This warning/error also applies to other libs (angular, backbone, etc.)
I have been working on a project for over a year now, I have never seen this message until roughly the last Firefox update.
I received it using jQuery 1.9.x, so I just updated my jQuery to 1.11.x and the error went away. I am now happy.
So, if you are using jQuery and see this Error/Warning, try updating your jQuery to the latest version.
Hope this helps someone.
In Firefox 27.0.1 I was getting this exact same error. I already have jQuery 1.11.0.
SyntaxError: Using //# to indicate sourceMappingURL pragmas is deprecated.
Use //# instead kendo.dataviz.min.js:25
22:09:26.635 Error: http://localhost/project/Scripts/kendo.dataviz.min.js is being assigned a //# sourceMappingURL, but already has one
I opened the kendo.dataviz.min.js and deleted the offending line:
//# sourceMappingURL=kendo.dataviz.min.js.map
put your code inside
$( document ).ready(function() {
//whatever
});
then the message dissappears.
For the people using Visual Studio 2013, and have downloaded the jQuery libraries via NuGet, check your jquery-x.x.x.min.js and you'll find the text comment below that's popping this warning on Firefox.
// # sourceMappingURL=jquery-x.x.x.min.map
You can safely remove those lines.
Update jquery - from the jQuery website http://www.jquery.com/download
You can also download a sourcemap file for use when debugging with a compressed file. The map file is not required for users to run jQuery, it just improves the developer's debugger experience. As of jQuery 1.11.0/2.1.0 the //# sourceMappingURL comment is not included in the compressed file.
Rails 3.2.11
I followed the instructions for this gem: https://github.com/crowdint/rails3-jquery-autocomplete. When I load the page that I want to have the autocompleted field, Jquery, jquery-ui, autocomplete-rails.js, etc are all being loaded. However, upon loading the page, I get this in the error console:
TypeError: 'undefined' is not a function (evaluating 'this.live')
The I uncompress the js file, and this is the function being referred to:
(function(jQuery)
{
var self = null;
jQuery.fn.railsAutocomplete = function() {
return this.live('focus',function() {
if (!this.railsAutoCompleter) {
this.railsAutoCompleter = new jQuery.railsAutocomplete(this);
}
});
};
Anyone have any idea what's going on? Since I'm not using '$' anywhere, the noConflict option doesn't seem to matter, and either way doesn't fix the issue. I didn't make any changes to autocomplete-rails.js
What's weird is that I swear this was working at some point, but I can't for the life of me figure out what changed to break it.
Yup, turns out I had an errant javascript_include_tag that loaded another copy of jquery. That was the issue
I believe the original poster's own answer was part of the solution for me as well. Using rails 3.2.13, jquery 1.9.0 and jquery-ui 1.9.2. More completely I also:
upgraded rails3-jquery-autocomplete to latest (from 1.0.9 to 1.0.11, when I saw: "When possible, use jQuery .on() rather than .live()" in the Changelog in rails3-jquery-autocomplete at github
removed possibly redundant or conflicting jquery includes
reordered includes, specifically placing underscore.js after autocomplete-rails
full stop and clearing of caches and compiled assets
After the first 3 steps, the broken behavior was still there (after each step I restarted server only). The last step was out of laziness, but thankfully showed that the combination of the above worked.