Skip to:
Content

BuddyPress.org

Opened 15 years ago

Closed 15 years ago

#894 closed defect (bug) (fixed)

x-profile Field Setup - Cannot delete multiselectbox or checkbox options

Reported by: r-a-y's profile r-a-y Owned by:
Milestone: 1.1 Priority: major
Severity: Version:
Component: Keywords:
Cc:

Description

When attempting to delete an x-profile field option in the BuddyPress admin area, you are unable to because the delete link doesn't contain the proper path to the BP_PLUGIN_DIR directory.

Change line 677 in "/buddypress/bp-xprofile/bp-xprofile-classes.php" from:

						<a href="admin.php?page=" . BP_PLUGIN_DIR . "/bp-xprofile.php&amp;mode=delete_option&amp;option_id=<?php echo $options[$i]->id ?>" class="ajax-option-delete" id="delete-<?php echo $options[$i]->id ?>">[x]</a></p>

to:

						<a href="admin.php?page=<?php echo BP_PLUGIN_DIR; ?>/bp-xprofile.php&amp;mode=delete_option&amp;option_id=<?php echo $options[$i]->id ?>" class="ajax-option-delete" id="delete-<?php echo $options[$i]->id ?>">[x]</a></p>
}}}.

Tested on BP 1.0.3.

Off-topic, I would appreciate it if someone would teach me how to create patch files!

Thanks!

Change History (4)

#1 @r-a-y
15 years ago

Grr... I forgot to escape the code block!

Let's try that again...

Change line 677 in "/buddypress/bp-xprofile/bp-xprofile-classes.php" from:

						<a href="admin.php?page=" . BP_PLUGIN_DIR . "/bp-xprofile.php&amp;mode=delete_option&amp;option_id=<?php echo $options[$i]->id ?>" class="ajax-option-delete" id="delete-<?php echo $options[$i]->id ?>">[x]</a></p>

to:

						<a href="admin.php?page=<?php echo BP_PLUGIN_DIR; ?>/bp-xprofile.php&amp;mode=delete_option&amp;option_id=<?php echo $options[$i]->id ?>" class="ajax-option-delete" id="delete-<?php echo $options[$i]->id ?>">[x]</a></p>

Tested on BP 1.0.3.

Off-topic, I would appreciate it if someone would teach me how to create patch files!

Thanks!

#2 @r-a-y
15 years ago

Just caught one other tiny, trivial thing... you can delete the closing </p> tag at the end as well!

#3 @apeatling
15 years ago

  • Milestone changed from 1.0.4 to 1.1

Milestone 1.0.4 deleted

#4 @apeatling
15 years ago

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

Fixed in a recent commit.

Note: See TracTickets for help on using tickets.