Closed JoryHogeveen closed 1 month ago
Enhancements in REST API Options
Several modifications took place in the set of options available for interacting with the REST API. This consists of alterations to the rest_base
that allows customized endpoints, rest_namespace
for custom namespace definitions, read_all
and read_all_access
for advanced viewing capabilities, write_all
to allow updates over all fields, and rest_api_field_mode
& rest_api_field_location
for advanced field handling. The changes enhance the flexibility and control of API calls made to the service.
Bug Fix in PodsRESTFields.php The PR also includes a crucial bug fix for versions of Pods before 3.2.7. Previously, the default value for 'pod_mode' was incorrectly assigned to the pod name. This issue is now rectified with the update. This bug fix will improve reliability and prevent misbehavior in the application's function.
Added backcompat handling but did not include a DB migration.
Description
De default value for the
write_all
option of a Pod was set to the Pod name. This results in incorrect parsing of a boolean inPodsRESTFields::field_allowed_to_extend()
inwrite
mode.@sc0ttkclark See testing instructions. I'm not sure how you would like to implement something that will repair old Pods. You could check for
! empty()
instead of usingfilter_var()
but that might not be desirable.Related GitHub issue(s)
Fixes #7327
Testing instructions
PodsRESTFields::field_allowed_to_extend()
and dump$all_fields_can_use_mode
. It will return false, allways.$pod->get_arg( $pod_mode_arg, 'value_not_set' )
and see it returns the Pod name instead of a 1 or 0.PR checklist