Skip to content

Conversation

@priethor
Copy link
Contributor

What

Fixes a bug where duplicated entities would always have the group_ prefix instead of the prefix of the entity.

Why

It's inconsistent with the keys of new entities, and won't pass schema validations.

How

In the base class ACF_Internal_Post_Type, use the attribute post_key_prefix, which child classes override, instead of hardcoding the prefix.

Testing instructions

  1. Create a post type
  2. Duplicate it
  3. Check that its internal key doesn't start with group_ anymore, but with post_type_

@priethor priethor self-assigned this Nov 14, 2025
@priethor priethor added the [Type] Bug Something isn't working label Nov 14, 2025
@github-actions
Copy link

github-actions bot commented Nov 14, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props priethor, cbravobernal.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@codecov
Copy link

codecov bot commented Nov 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 3.37%. Comparing base (e870b55) to head (1149b6b).
⚠️ Report is 2 commits behind head on trunk.

Additional details and impacted files
@@            Coverage Diff             @@
##             trunk    #240      +/-   ##
==========================================
+ Coverage     1.17%   3.37%   +2.19%     
  Complexity    4416    4416              
==========================================
  Files          261     261              
  Lines        27017   27017              
==========================================
+ Hits           318     911     +593     
+ Misses       26699   26106     -593     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@priethor priethor force-pushed the fix/entity_prefix_in_key branch from 52e08a9 to 90de127 Compare November 14, 2025 11:17
Added comment to clarify the purpose of uniqid function.
@priethor priethor merged commit 5f26643 into trunk Nov 14, 2025
8 checks passed
@cbravobernal cbravobernal added this to the 6.6.0 milestone Nov 14, 2025
@priethor priethor deleted the fix/entity_prefix_in_key branch November 26, 2025 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants