Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#25936 closed defect (bug) (invalid)

Invalid callback when attempting to access certain pages while logged out

Reported by: henrywright's profile henrywright Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'wp_shake_js' not found or invalid function name in /wp-includes/plugin.php on line 406

This warning appears on screen when doing the following:

  1. Install BuddyPress
  2. Install the Theme My Login plugin and use 'login' as a custom login page
  3. While logged out, attempt to visit a BuddyPress page such as example.com/members/username/settings

Change History (3)

#1 @SergeyBiryukov
12 years ago

BuddyPress ticket: http://buddypress.trac.wordpress.org/ticket/4990.

This appears to be a conflict between BuddyPress and Theme My Login.

BuddyPress adds wp_shake_js() function to the 'login_head' action in two places:
http://buddypress.trac.wordpress.org/browser/tags/1.8.1/bp-core/bp-core-catchuri.php#L514
http://buddypress.trac.wordpress.org/browser/tags/1.8.1/bp-members/bp-members-functions.php#L1503

The function is only defined in wp-login.php and not on a custom page created by Theme My Login:
tags/3.7.1/src/wp-login.php#L237.

I see three options to fix the issue:

  1. In BuddyPress, check if the function exists before using it.
  2. In Theme My Login, define the function if it doesn't exist.
  3. In core, move the function to a file in wp-includes, like we did for several functions in [25231].

I think 1 & 2 would be enough, as wp_shake_js() seems intrinsic to wp-login.php and does not belong in any other file.

Last edited 12 years ago by SergeyBiryukov (previous) (diff)

#2 @henrywright
12 years ago

SergeyBiryukov I forgot I raised that BP Trac ticket, it seems as though it has been tagged as a bug in the BP custom theme and subsequently closed. Apologies for opening a new ticket here.

#3 @SergeyBiryukov
12 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

I don't think it's theme-specific, looks more like a conflict between BuddyPress and Theme My Login.

I guess Theme My Login should take into account that other plugins can use wp_shake_js() (option 2 above).

Note: See TracTickets for help on using tickets.