-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Fix: properly merged schema during mergeSchemas
part in getBlockContentSchemaFromTransforms
#70615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Fix: properly merged schema during mergeSchemas
part in getBlockContentSchemaFromTransforms
#70615
Conversation
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
oh god, I messed up while trying to merge trunk, sorry. |
e0ea486
to
bf62d34
Compare
Hi, Sorry to all the reviewers that got the notifications from this PR. I was trying to merge the trunk to update the branch to latest commit but accidentally rebased it. I have fixed the branch but sorry for the ping that got requested due to this mishap. Sorry again for all this. |
@USERSATOSHI Don't worry about it! We've all been there! 😅 It happens occasionally and is not a big deal. |
😅 |
@USERSATOSHI Thanks for the PR. Would it be possible for you to write some tests to replicate the bug you were experiencing and show that your changes resolve this issue 🙏 |
Hi @getdave, Just to confirm, I need to write an unit test which would validate the working of the patch, or a reproduction report and a patch testing report showing the bug replication and patch testing? If it is the latter , for bug replicate there is a failing action of this Which should validate that bug replication. And for patch testing report , I can write the report. 😄 |
I was thinking of adding some coverage to the existing unit tests in |
oh got it, I will add the tests for this then. thank you |
Hi @getdave, I added tests for coverage of this issue.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM🚀
The Patch fixes the issue I am no longer getting the error.
Bug Reproduction link for anyone to check: #70612 (comment)
Before

After

What?
Closes #70612
This PR fixes the bug where merging schemas causes top level
classes
property to convert from array to object with indices as keys.Why?
As the classes gets converted to Object the cleanNodeList function fails when it tries to map the classes property.
Error at this line
How?
The Solution checks whether
b[key]
is an array or not, if it is an array , seta[key]
to be copy of b[key] else the original object shallow clone.Testing Instructions
Follow the instructions of #70612
Screenshots or screencast
Before
Screen.Recording.2025-07-04.at.2.08.59.PM.mov
Results
Screen.Recording.2025-07-04.at.2.35.36.PM.mov
Block Transform Code
Screen.Recording.2025-07-04.at.2.37.14.PM.mov