Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#44834 closed defect (bug) (fixed)

Unable to set term meta in create term request

Reported by: joehoyle's profile joehoyle Owned by: sergeybiryukov's profile 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 6 years ago.

Download all attachments as: .zip

Change History (13)

#1 @joehoyle
6 years ago

  • Owner set to joehoyle

@joehoyle
6 years ago

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


6 years ago

#3 @dlh
6 years ago

I tested the patch, and it worked as expected.

#4 @kadamwhite
6 years 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
6 years ago

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

Reopening for 4.9.9 consideration.

#6 @SergeyBiryukov
6 years 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
6 years 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
6 years ago

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

#9 @SergeyBiryukov
6 years 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 6 years ago by SergeyBiryukov (previous) (diff)

#10 @danielbachhuber
6 years ago

#40889 was marked as a duplicate.

#11 @pento
6 years 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
6 years 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.