Skip to:

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#8043 closed defect (bug) (wontfix)

Convert XProfile admin AJAX to REST API

Reported by: boonebgorges's profile boonebgorges Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Extended Profile Keywords: needs-patch


Change History (4)

This ticket was mentioned in Slack in #buddypress by boone. View the logs.

5 years ago

This ticket was mentioned in Slack in #buddypress by boone. View the logs.

5 years ago

#3 @boonebgorges
5 years ago

  • Milestone 5.0.0 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

I've done some in-depth review of the existing AJAX here, and I don't know that there are any easy wins. Most of the interface does not, in fact, use AJAX. The only places where AJAX is actually used are as follows:

  1. Updating field order within a group. But this doesn't neatly fit with the REST endpoints - we need a bulk action. Probably best kept as a custom AJAX endpoint for now.
  2. Updating option order within a field. Same argument as 1.
  3. There's JS and PHP that's meant to power AJAX deletion of profile field groups, but it's broken in a couple of fundamental ways: there's no 'confirm' message (as there is designed to be), there's no success/failure when performed asynchronously, and there's no preventDefault(), so the delete always takes place via a page refresh anyway. This could use fixing, but it's difficult to pick apart in this context.

As such, I'm rescinding my initial suggestion that this is a "good first candidate" :) Moving to the REST API would be part of a more substantial rewrite.

This ticket was mentioned in Slack in #buddypress by imath. View the logs.

5 years ago

Note: See TracTickets for help on using tickets.