WordPress.org

Make WordPress Core

Opened 11 months ago

Closed 9 months ago

#44834 closed defect (bug) (fixed)

Unable to set term meta in create term request

Reported by: joehoyle Owned by: SergeyBiryukov
Milestone: 4.9.9 Priority: normal
Severity: normal Version: 4.7
Component: REST API Keywords:
Focuses: Cc:

Description

There's a typo in https://core.trac.wordpress.org/browser/trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php#L457 where the wrong ID is passed to update_value. This makes it impossible to set meta on a create request.

Attachments (1)

44834.diff (2.8 KB) - added by joehoyle 11 months ago.

Download all attachments as: .zip

Change History (13)

#1 @joehoyle
11 months ago

  • Owner set to joehoyle

@joehoyle
11 months ago

This ticket was mentioned in Slack in #core-restapi by joehoyle. View the logs.


11 months ago

#3 @dlh
11 months ago

I tested the patch, and it worked as expected.

#4 @kadamwhite
10 months ago

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

In 43636:

REST API: Pass correct ID to meta->update_value to permit setting term meta during term creation.

Props joehoyle.
Fixes #44834.

#5 @SergeyBiryukov
10 months ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for 4.9.9 consideration.

#6 @SergeyBiryukov
10 months ago

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

In 43637:

REST API: Pass correct ID to meta->update_value to permit setting term meta during term creation.

Props joehoyle.
Merges [43636] to the 4.9 branch.
Fixes #44834.

#7 @peterwilsoncc
10 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening as [43637] is causing the tests to fail on the 4.9 branch.

#8 @peterwilsoncc
10 months ago

  • Owner changed from joehoyle to SergeyBiryukov
  • Status changed from reopened to assigned

#9 @SergeyBiryukov
10 months ago

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

Failures were caused by missing test_tag_single fixture, resolved in [43646].

Last edited 10 months ago by SergeyBiryukov (previous) (diff)

#10 @danielbachhuber
10 months ago

#40889 was marked as a duplicate.

#11 @pento
10 months ago

  • Keywords fixed-major removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

[43636] can be merged to the 5.0 branch.

#12 @SergeyBiryukov
9 months ago

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

In 43714:

REST API: Pass correct ID to meta->update_value to permit setting term meta during term creation.

Props joehoyle.
Merges [43636] to the 5.0 branch.
Fixes #44834.

Note: See TracTickets for help on using tickets.