Skip to:

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#610 closed defect (bug) (fixed)

undefined constant BP_XPROFILE_FULLNAME_FIELD_NAME on install

Reported by: djpaul's profile DJPaul Owned by:
Milestone: Priority: major
Severity: Version:
Component: Keywords:


Not sure how important this is, but it does cause an error in the web server log.

SITUATION: WPMU 2.7, BP from Trunk, Clean install.
NOTE: BP files already put in place before running WPMU install.

1) WPMU installs with some WPMU errors in the log. Not BP's problem. Anyhow.
2) On the WPMU "successful install here, remember to chmod your folders back to 755, here's your admin password, click here to log in page", no errors are generated. So far so good.
3) Then you follow the link to take you to Again, no errors. You log in...
4) It takes you to and we have errors! A bunch, but one bug at a time:

[Sat Mar 21 14:15:55 2009] [error] [client] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE name = ''' at line 1 for query SELECT id FROM  WHERE name = '' made by require_once, require, do_action, call_user_func_array, bp_core_setup_globals, bp_core_global_user_fullname, '''bp_fetch_user_fullname''', xprofile_set_field_data, xprofile_get_field_id_from_name, BP_XProfile_Field->get_id_from_name, referer:

After tracking this back, I believe it to be caused because:
1) bp-core-templatetags.php, line 246 - bp_fetch_user_fullname(). This uses the constant BP_XPROFILE_FULLNAME_FIELD_NAME...
2) ...which is defined in bp-xprofile.php. I can't find any require() or include() call to bp-xprofile.php so I am assuming WP loads these files in alphabetical order (depending on the file system)...
3) ... i.e. after bp-core-templatetags.php. So when templatetags tries to use the constant, it's not defined yet. BOOM.

This only happens on the very first load of the admin pages, so obviously to do with the BP installation routines. Not sure how best to fix this.

Change History (2)

#1 @apeatling
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [1298]) Fixes #610 props DJPaul for the detailed analysis.

#2 @(none)
15 years ago

  • Milestone Core 1.0 deleted

Milestone Core 1.0 deleted

Note: See TracTickets for help on using tickets.