Fix: Title is not copied correctly when duplicating navigation#53610
Conversation
|
Size Change: -2 B (0%) Total Size: 1.5 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Thank you for this fix 🙇
I tested this and
- verified the original problem on
trunk - verified this PR fixes that problem
What I'd like to understand (maybe from @jeryj) is why this happens? I thought we'd resolved all of this missing sub properties stuff previously?
|
I understand as follows.
In other words, of the areas refactored in #52807, the direct use of the value of the I have looked again at why this difference occurs, and this series of comments seems to be right on target.
|
Follow-up on #52807
What?
This PR fixes a problem with the title being converted to the unintended string
[object object]when the navigation menu is duplicated.Why?
The navigation object passed to the copy handler is obtained via
useEntityRecord().gutenberg/packages/edit-site/src/components/sidebar-navigation-screen-navigation-menu/index.js
Lines 29 to 33 in 4f4f8e5
I don't fully understand, but the
titleproperty should be an object withrawandrenderedproperties, not a string.How?
Reverted to the previous implementation of checking the
renderedproperty.Testing Instructions
{Navigation Name} (copy).