Skip to:
Content

bbPress.org

Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#3280 closed defect (bug) (fixed)

Sorry, you are not allowed to edit the _bbp_topic_count custom field

Reported by: johnjamesjacoby's profile johnjamesjacoby Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.6.1 Priority: high
Severity: major Version: trunk
Component: API - Registration Keywords: commit
Cc:

Description

Reported in the forums:

https://bbpress.org/forums/topic/not-allowed-to-edit-the-_bbp_topic_count-custom-field

This is happening because many of the registered meta-data keys start with _ to hide them from the WordPress custom fields box, but without an explicitly set auth_callback they are assumed to protected, causing __return_false to be used.

Patch & commit imminent.

Attachments (1)

3280.patch (436 bytes) - added by johnjamesjacoby 5 years ago.
Allow count meta data to be updated/deleted by anyone.

Download all attachments as: .zip

Change History (3)

@johnjamesjacoby
5 years ago

Allow count meta data to be updated/deleted by anyone.

#1 @johnjamesjacoby
5 years ago

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

In 6948:

Meta Registration: add auth_callback to count meta arguments.

This commit fixes a conflict with plugins that use the WordPress REST API in add/edit page/post screens.

Item count meta keys start with underscores so they would be hidden from view in the Custom Fields meta-box, but that also means they are flagged as protected in the REST API, and without an explicit auth_callback argument __return_false is assumed to be on the safe side.

This change explicitly allows all item count meta keys to be updated or deleted by all users, while still retaining their invisibility as protected meta data.

It also adds more verbose inline documentation to each argument, for improved clarity and future reference.

Fixes #3280. Props pdvwp, rtsbeacon, jufdaniellevideos for their helpful feedback in the forums. For 2.7, trunk.

#2 @johnjamesjacoby
5 years ago

In 6949:

Meta Registration: add auth_callback to count meta arguments.

This commit fixes a conflict with plugins that use the WordPress REST API in add/edit page/post screens.

Item count meta keys start with underscores so they would be hidden from view in the Custom Fields meta-box, but that also means they are flagged as protected in the REST API, and without an explicit auth_callback argument __return_false is assumed to be on the safe side.

This change explicitly allows all item count meta keys to be updated or deleted by all users, while still retaining their invisibility as protected meta data.

It also adds more verbose inline documentation to each argument, for improved clarity and future reference.

Fixes #3280. Props pdvwp, rtsbeacon, jufdaniellevideos for their helpful feedback in the forums. For 2.6.1, branches/2.6.

Note: See TracTickets for help on using tickets.