Skip to:

Opened 9 years ago

Last modified 8 years ago

#6201 reopened defect (bug)

Uncaught TypeError: undefined is not a function on line 1326 of global.js

Reported by: tnoguchi's profile tnoguchi Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.2
Component: Core Keywords: dev-feedback


I just updated to version 2.2 and discovered a JS error in console for line 1326 of global.js

jq.cookie( 'bp-activity-oldestpage', 1, {

An initial search turned up an older thread from 5 months ago affecting ver 2.1,

After adding the fix mentioned in the patch:

I was able to resolve the issue.

Attachments (1)

Screen Shot 2015-03-09 at 12.34.16 AM.png (525.1 KB) - added by tnoguchi 9 years ago.
Screenshot of error

Download all attachments as: .zip

Change History (7)

#1 @DJPaul
9 years ago

  • Keywords 2nd-opinion added
  • Milestone changed from Awaiting Review to Under Consideration

Thanks for getting in contact, @tnoguchi, though I'm not yet convinced this problem still exists. Are you using the BP-Default theme on your site? What URL do you have to be on to trigger the warning, and what action do you have to take (what do you have to click on, etc)?

It might help to know which browser you found this problem in.

#2 @tnoguchi
9 years ago

Apologies for the belated response. Just to answer your questions:

  • The error is in Chrome 41.0.2272.74.
  • We're using a child theme based on twentytwelve for the site.
  • Inspecting the console it looks like the error is on every page in the site.
  • I'm not doing anything besides visiting pages.

The js error breaks a slider on the homepage, adding the patch
seems to fix the issue.

9 years ago

Screenshot of error

#3 @r-a-y
9 years ago

  • Keywords 2nd-opinion removed
  • Milestone Under Consideration deleted
  • Status changed from new to closed

Judging from the global.js file in the console, it looks like you're using the older bp-default theme or a copy of the bp-default theme.

I'm guessing you need to make the following change in your theme's functions.php:

Let us know if making that change will fix your issue.

In the meantime, I'm marking this as a duplicate of #5889.

#4 @rpayne7264
9 years ago

  • Status changed from closed to reopened

This bug is still an issue.

I just installed the latest version of BP: Version

The bug resulted in the script of my plugin for logging in with LinkedIn not executing and attaching the click event to the login button.

I had to modify the functions bp_init_activity and bp_init_objects in global.js, by adding a check:

if(typeof jq.cookie == 'undefined')return;

After doing that, the login button functions as expected.

You might also want to consider changing the jQuery object instantiation to the following:

var jq = jQuery.noConflict();

Last edited 9 years ago by rpayne7264 (previous) (diff)

#5 @DJPaul
8 years ago

  • Component changed from API to Core

#6 @slaFFik
8 years ago

  • Keywords dev-feedback added
Note: See TracTickets for help on using tickets.