fix: type.attributes.map is not a function & batch translation #531
Merged
sargreal merged 3 commits intoFekide:nextfrom Dec 18, 2025
Merged
fix: type.attributes.map is not a function & batch translation #531sargreal merged 3 commits intoFekide:nextfrom
sargreal merged 3 commits intoFekide:nextfrom
Conversation
sargreal
requested changes
Nov 6, 2025
Member
sargreal
left a comment
There was a problem hiding this comment.
Thank you @breezertwo for trying to fix those issues for the new strapi versions!
I believe this is almost ready, just one small fix, related to the unit tests.
sargreal
approved these changes
Dec 18, 2025
Member
sargreal
left a comment
There was a problem hiding this comment.
Thanks a lot for this!
And sorry for the long wait
|
🎉 This PR is included in version 2.0.0-next.4 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.3.0-next.4 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.2.0-next.4 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: type.attributes.map is not a function ([BUG]: type.attributes.map is not a function #526)
This comment mentioned the root of the error. The reducer in
addTranslationToFieldsuses{}as inital value. Due to typing issues I could not replace the object with an empty array. UsingObjec.valuesandmapinstead returns the expected array.fix: batch translation update fails due to empty relations ([BUG]: Batch translation throws error on strapi.document.update (2.0.0-next.3) #532)
For batch translation we always got an error that the translation failed, but we where seeing that tokens had been used on deepl.
translateEntityfrom the translate service threw the error and I could trace it back tostrapi.documents(params.contentType).updatein this method, which was throwing due to some entries in thecleanedDataobject whererelationName: []. I added a fix to delete all empty arrays from the object before returning it. With this fix, all updates where working correct again.ℹ️
As our content team was running into these issues with the beta I attempted a fix which is working fine for us. Maybe the fixes can be released as a update for the current
nextversion so others can make use of it, if the fixes are fine and approved. At least somebody may use my fixes as a reference if the need to patch it them selfs.Let me know if you need any more infos here or feel free to close this PR if is not of use.
Thanks for this awesome plugin.