Skip to content

Field::getValue() returns defaultLocale value (if current locale value is empty empty) for non-localizable fields#1300

Merged
bobdenotter merged 1 commit into
masterfrom
bugfix/locale-fallback-value
Apr 16, 2020
Merged

Field::getValue() returns defaultLocale value (if current locale value is empty empty) for non-localizable fields#1300
bobdenotter merged 1 commit into
masterfrom
bugfix/locale-fallback-value

Conversation

@I-Valchev

@I-Valchev I-Valchev commented Apr 16, 2020

Copy link
Copy Markdown
Member

🤦‍♂️

For months I worked under the assumption that non-translatable fields fallback to the default locale. But this is not how the doctrine-behaviors translate() method works. The fallback option is for en_GB to fallback to en, not to fallback to the defaultLocale.

My misunderstanding led to wrong implementation further down the line, which convoluted the problem further.

@I-Valchev I-Valchev changed the title Field::getValue() returns defaultLocale value for non-localizable fields Field::getValue() returns defaultLocale value (if current locale value is empty empty) for non-localizable fields Apr 16, 2020

@bobdenotter bobdenotter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bobdenotter bobdenotter merged commit bf2daca into master Apr 16, 2020
@bobdenotter bobdenotter deleted the bugfix/locale-fallback-value branch April 16, 2020 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants