REST API `PATCH/PUT /admin/courses/{id}/lessons/{id}` silently drops the `message` field (2.6.01 → 2.7.0)
Environment: FluentCommunity + FluentCommunity Pro 2.7.0, WordPress on PHP (Cloudways). Authenticated via WP Application Password (Basic Auth), admin user.
Summary: Updating a lesson's body content through the admin REST endpoint no longer works. The API reports success but the message field is never written.
Steps to reproduce:
GET /wp-json/fluent-community/v2/admin/courses/{courseId}/lessons/{lessonId}— note themessage.PATCH(orPUT) the same endpoint with a body of{"title":"...","message":"<new content>"}.- Response returns
{"message":"Lesson has been updated successfully.","lesson":{...}}(HTTP 200). GETagain —titleand other fields updated correctly, butmessage(andmessage_rendered) are unchanged. The new content is silently discarded.
Expected: message is persisted to wp_fcom_posts.message and re-rendered into message_rendered.
Actual: message is ignored on write. PUT additionally throws a 500 (null-argument error) in 2.6.01.
Notes: Confirmed on both 2.6.01 and 2.7.0. Other fields (title, status) write through fine — the issue is isolated to the message field on the lesson update handler. Current workaround is a direct $wpdb->update() on wp_fcom_posts, which persists correctly and renders fine, so the schema/render path is healthy — the problem is in the REST update handler dropping the field.
Tagging Raiyan Marzan
Wayne Ulery Thanks for the detailed report. The issue is the request format not a server-side drop. Use PUT and nest the payload under a lesson key. Currently the handler reads the payload from lesson so a flat body ({"title":...,"message":...}) resolves to null. Use the following format
{"lesson":
{"title": "string",
"status": "draft | published |archived",
"parent_id": "string",
"message": "string",
"meta": { }
}
}
You also can check the response format from the developer docs: https://dev.fluentcommunity.co/restapi/operations/courses/update-course-lesson#request-body
With this format the direct $wpdb->update() workaround is no longer needed.
Regarding PATCH, it currently accepts only title, status and slug by design and does not process message. We'll add
message support to the PATCH endpoint in the next release. Thank you!