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
fix: Creating a new locale doesn't pre-fill the non-internationalized fields #18773
Conversation
Size Change: +1 B (0%) Total Size: 666 kB ℹ️ View Unchanged
|
@derrickmehaffy can you move this to target main so we only address the 4.15.x issues in 4.15.5 1st. I'll clear the milestone for now |
Ill need to rebase this so don't merge yet |
a73adb4
to
1337050
Compare
Ready for review again, sorry for the delay |
When will this be merged, still waiting ^^ |
Now we have TS it's easier to understand this fix and I think i need more time to dig deep. Because |
Building an experimental to test with: https://github.com/strapi/strapi/actions/runs/7119256371 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment was marked as spam.
This comment was marked as spam.
@joshuaellis I understand the want/need to fix this properly but as it's impacting users and we know that so far this is working can we merge it and look at this later to figure out a more proper way to address it and in the meantime get it working for users? If we need to validate if this will cause other problems I can generate an experimental and let users test with it for a bit |
Yeah sorry, can you sort the conflicts out? The file is now in TS iirc, then we can do an experimental, I can write up a JIRA ticket and add a TODO and get the ball rolling 🎳 |
1337050
to
950b677
Compare
@joshuaellis I rebased this on main instead since we aren't using develop anymore (AFAIK) unless something is changing in 4.17 in which case I'll wait til after that release and rebase it on that instead. |
New experimental being generated based on 4.16.2: https://github.com/strapi/strapi/actions/runs/7402447192 |
I'm worried this will get lost in the re-merger because of the different file extensions. Lets wait to do 4.17.0 release & then merge 👍🏼 |
Sounds good! |
Hi, sorry for bothering. May I ask when this issue will be fixed, because I'm not seeing any 'Milestone' for it (and this other issue that I was keeping track of for a similar problem has been closed 😅 #17837)? Thanks a lot. |
950b677
to
a3690b1
Compare
7d37670
to
7fca7d4
Compare
@derrickmehaffy when you get a chance can you double check the fix please? Then I can approve and we can merge 😄 thank you for your patience. |
Yup I'll do it this afternoon. Rebase and rebuild the experimental and confirm it fixes the problem. |
This comment was marked as spam.
This comment was marked as spam.
7fca7d4
to
1e46ca9
Compare
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@joshuaellis Will this be for the new version? |
Check the milestone. |
What does it do
fixes #17860
fixes #17700
Relates to #12538
Why is it needed
Creating a new locale doesn't pre-fill the non-internationalized fields. But when you refresh the page, they get filled.
How to test it
Recreation:
settings -> internationalization
Enable localization for this field
option in advanced settingslocale
dropdown and select another locale that doesn't have an entry yet.a. See another error. Notice that if you open the
locale
dropdown again, the previous locale is marked as if it didn't have an entry, although it does.b. If you click the previous locale, it takes you to an empty new page with the locale that should be filled but it's not.
c. If you reload, fields are also filled now. But the page is still
Create an entry
instead of the standard editing view.locale
dropdown displays the correct state for the translations.https://www.loom.com/share/29deb7eca88840f6b829894313f18b18?t=12
Fix:
https://www.loom.com/share/737dede941974c209c4f8679ecc7ae1a?sid=21f65051-246d-4cd9-9af0-f5d03be6626d
How the fix works:
The error is happening in the try block of
middlewares/addCommonFieldsToInitialDataMiddleware.js
as the value for currentLayout isnull
, If we add await in getData() then it will be fixed.This PR is a mirror of: #18386
Issues