Skip to content
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

Issue #3466386: Country field keeps popping back on edit content #4011

Conversation

vcsvinicius
Copy link
Contributor

@vcsvinicius vcsvinicius commented Aug 6, 2024

Problem

When creating a new group or event, I change the country field to none. When I go to edit the content, the country field keeps popping back with the default value.

Solution

Remove the code filling the default value and start to use the behavior from Address about default value.

So I added two submit function to copy the country default value when it is saved or updated and I added an hook-update to copy the value to old installation.

Issue tracker

PROD-27371
#3466386

Theme issue tracker

N/A

How to test

  • Enable the Field UI (We will use this module only to check the default value)
  • Go to Regional Settings "/admin/config/regional/settings"
  • Fill and change the Default Country and save
  • All time you change the Default Country, go to Manage Field from Event and Flexible Group, check the default values from Address field (Event: /admin/structure/types/manage/event/fields/node.event.field_event_address | Group: /admin/group/types/manage/flexible_group/fields/group.flexible_group.field_group_address)
  • Create an Event or a Group and check the default value is the same from filled before
  • Edit the content created before and clean Country field
  • Comeback to edit content again and check if Country field continue empty

Screenshots

N/A

Release notes

Fixed the bug about fill default value from Country field on Event and Group all time.

Change Record

N/A

Translations

N/A

@vcsvinicius vcsvinicius added type: bug Fixes a bug in Open Social status: needs review This pull request is waiting for a requested review prio: medium team: guardians labels Aug 6, 2024
@vcsvinicius vcsvinicius added this to the 13.0.0-alpha9 milestone Aug 6, 2024
@vcsvinicius vcsvinicius requested a review from a team August 6, 2024 18:24
@vcsvinicius vcsvinicius force-pushed the bugfix/3466386/country-field-keep-popping-back-with-default-value branch 2 times, most recently from 8b58dd2 to bed153d Compare August 6, 2024 18:46
@BiaInacio
Copy link
Contributor

Country keeps the value set on creation for groups and events!
image
image

@robertragas robertragas force-pushed the bugfix/3466386/country-field-keep-popping-back-with-default-value branch from bed153d to 574c9c6 Compare August 23, 2024 07:33
Copy link
Contributor

@robertragas robertragas left a comment

Choose a reason for hiding this comment

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

Nice to start using the field config!

@robertragas robertragas merged commit 6400391 into main Aug 23, 2024
190 checks passed
@robertragas robertragas deleted the bugfix/3466386/country-field-keep-popping-back-with-default-value branch August 23, 2024 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio: medium status: needs review This pull request is waiting for a requested review team: guardians type: bug Fixes a bug in Open Social
Development

Successfully merging this pull request may close these issues.

4 participants