Skip to:

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#5719 closed defect (bug) (fixed)

"Undefined index: Name" when Cancelling Friendship

Reported by: faison's profile Faison Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.0
Component: Core Keywords:


If you have WP_Debug enabled and you press the Cancel Friendship on the friends page, you will be presented the following warning after the AJAX request completes:

Notice: Undefined index: Name in /wp-content/plugins/buddypress/bp-core/bp-core-classes.php on line 798

Unfortunately I'm not very familiar with BuddyPress, so I can't offer a patch at this moment, but I still wanted to point out this issue in hopes that someone else can.


Change History (5)

#1 @boonebgorges
10 years ago

  • Keywords reporter-feedback added

Please share more information about your setup:

  • Is your site in English, or are you running a different language pack?
  • What is the name of your Name field? Dashboard > Users > Profile Fields

#2 @Faison
10 years ago

The site's English.

Name of the name field?
Well there's a "Display Name (Primary)(Required)" field with the name attribute set as "field_1"
Also, there's a "Full Name" field with the name attribute set as "field_31"

Is that what you were asking for?

#3 @boonebgorges
10 years ago

Related ticket: #3725

The issue appears to be that the name of your field_1 'Display Name' is not properly synced to your general BP settings ('bp-xprofile-fullname-field-name'). This can happen in a couple of odd edge cases, including where the field was modified by another plugin.

For your specific case, you should be able to resolve the issue as follows:

  • Make sure that the BP_XPROFILE_FULLNAME_FIELD_NAME constant is not defined in bp-custom.php or wp-config.php. (Or, if it is defined, make sure it reads 'Display Name', exactly like the field name is saved in the database.)
  • Force a re-sync of the names by resaving the field. Dashboard > Users > Profile Fields. Then act as if you're going to edit the Display Name field. Save the field without changing any values.

This should solve the problem for your installation.

In the future, I would like for us to move away from using this kind of dynamic reference at all (or at least switch to a direct query). See eg my commit message in r7812.

Thanks for the report.

#4 @Faison
10 years ago

  • Keywords reporter-feedback removed
  • Resolution set to fixed
  • Status changed from new to closed

Thanks boonebgorges!

Forcing a re-sync by re-saving the field fixed the issue :)

#5 @DJPaul
10 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.