AdvancedCustomFields / AdvancedCustomFields/acf

ACF field saved as existing meta field with capital letter

Open
#87 2 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

On a post I've added a metafield with the key 'Partner' and the value 'J'. Partner is with a capital P.
I installed ACF en added a field with label 'Partner'. Ofcourse the field name automatically becomes 'partner' with a lower p. So this wouldn't be a problem with the existing key.
But as long as the old metafield 'Partner' exists in that post, the ACF field 'partner' is updated in the old metafield 'Partner'. The ACF field gets empty after saving the post and only the old metafield is updated.
I would have expected that on save the ACF field remains filled and a metakey 'partner' is added and the old 'Partner' metakey remains the same.
If I first remove the 'Partner' key, then the ACF field works fine.

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

Reproduce this in a WordPress post using an existing case-sensitive Partner meta key and a new ACF field named partner; observe the saved values in post meta. Trace the ACF save path and WordPress metadata lookup, then verify that saving preserves Partner and creates or updates a separate partner key while retaining the field value.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
backend, database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.