Skip to content

Fix issue with loading translated data with arrayNames#84

Merged
mjauvin merged 1 commit intowintercms:wip-ml-repeater-fieldsfrom
nmiyazaki-chapleau:wip-ml-repeater-fields
Aug 1, 2024
Merged

Fix issue with loading translated data with arrayNames#84
mjauvin merged 1 commit intowintercms:wip-ml-repeater-fieldsfrom
nmiyazaki-chapleau:wip-ml-repeater-fields

Conversation

@nmiyazaki-chapleau
Copy link
Copy Markdown

A previous PR I did, #83, added a fix for obtaining data with arrayNames in MLControl's getLocaleFieldName method. However, loading data with arrayNames was not implemented. This PR aims to fix this issue by doing a basic implementation within the getLocaleValue and getLocaleSaveValue methods.
It has not been thoroughly tested; the main tests were for an implementation with the Blocks plugin, which uses arrayNames.

Any input is welcome.

@LukeTowers LukeTowers requested a review from mjauvin June 7, 2024 04:05
@LukeTowers
Copy link
Copy Markdown
Member

Seems fine to me, @mjauvin any thoughts? Related: wintercms/wn-blocks-plugin#34

@mjauvin
Copy link
Copy Markdown
Member

mjauvin commented Jun 7, 2024

I'll look into this when I get back from my vacation.

@mjauvin
Copy link
Copy Markdown
Member

mjauvin commented Jun 13, 2024

A previous PR I did, #83, added a fix for obtaining data with arrayNames in MLControl's getLocaleFieldName method. However, loading data with arrayNames was not implemented. This PR aims to fix this issue by doing a basic implementation within the getLocaleValue and getLocaleSaveValue methods. It has not been thoroughly tested; the main tests were for an implementation with the Blocks plugin, which uses arrayNames.

Any input is welcome.

Does this work when $this->valueFrom is used as well?

@LukeTowers
Copy link
Copy Markdown
Member

@nmiyazaki-chapleau are you still interested in getting this merged?

@mjauvin mjauvin self-assigned this Aug 1, 2024
@mjauvin mjauvin merged commit 0e12827 into wintercms:wip-ml-repeater-fields Aug 1, 2024
@nmiyazaki-chapleau nmiyazaki-chapleau deleted the wip-ml-repeater-fields branch August 1, 2024 12:55
@nmiyazaki-chapleau
Copy link
Copy Markdown
Author

A previous PR I did, #83, added a fix for obtaining data with arrayNames in MLControl's getLocaleFieldName method. However, loading data with arrayNames was not implemented. This PR aims to fix this issue by doing a basic implementation within the getLocaleValue and getLocaleSaveValue methods. It has not been thoroughly tested; the main tests were for an implementation with the Blocks plugin, which uses arrayNames.
Any input is welcome.

Does this work when $this->valueFrom is used as well?

As long as arrayName should be applied to $this->valueFrom, then yes, as this uses the $key variable.

@nmiyazaki-chapleau are you still interested in getting this merged?

Yes, thank you and thanks @mjauvin for the emrge. I haven't worked with winter in a bit, but getting these things done helps. Appreciate all the work you've done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants