AdvancedCustomFields / AdvancedCustomFields/acf

WP Rest API bugs when going from 5.11.4 to 5.12

Open
#615 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
945
Forks
197
PR merge metrics
No merged PRs in 30d

Description

I had some hours of debugging unexpected errors from 5.11.4 to 5.12.
Made a ticket on the acf-site, instead of here - but since I found this place now - it s better suited here.

The three big gotchas for me was this, when upgrading the plugin in our composer-file.

  1. Acf Field Groups disabled the "WP Rest API" setting - even though they earlier was set to "true" - for each field group.
  • this did break our site depending on the WP Rest API.
  1. Data typing, json/acf field types
    Before v5.12, the value of a ACF Type "Number" with the value of 12345 - was represented in the JSON output as a string, "12345", and not 12345. This makes some strict data type checking and external code to have issues. v5.12 changed this.

Even if I do like this change - it will break many implementations.

  1. ACF Field image
    This field return the numerical ID of the image-field. And this happens regardless of "return format" set on the field. And this for sure breaks external code, since it tries to load 745 instead of a url to the image.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by reproducing the 5.11.4-to-5.12 upgrade and compare field-group REST settings, number JSON types, and image return values; done would require defining and verifying the intended behavior for all three regressions.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
api, backend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.