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 #3441126: Language configuration create wrong to Original Language at group-type #3866

Conversation

vcsvinicius
Copy link
Contributor

@vcsvinicius vcsvinicius commented Apr 15, 2024

Problem

Some installation has a record at config table to original language and it's wrong, because original language will get data from the content and other language should have a record for they data.
When this record exists, the core never get the right data, because config by translation has priorioty to be selected.

Solution

Create a hook-update to remove all extra record.

Issue tracker

Theme issue tracker

PROD-27808
#3441126

How to test

That error isn't happen for new installation, because probable it was a bug already fixed by community, so to reproduce we need to add a record directly to the database.

  • Install social language
  • Add a second language
  • Go to Group Type configuration
  • Add translate for the groups
  • Go to the table config and look for the translate for each group 'group.type.group_id', change the group id, example: closed_group, flexible_group...
  • Duplicate the record for second language and change the collection column to the original-language
  • With that the code start to get that record created steo before instead of content

Definition of done

Before merge

  • Code/peer review is completed
  • All commit messages are clear and clean. If applicable a rebase was performed
  • All automated tests are green
  • Functional/manual tests of the acceptance criteria are approved
  • All acceptance criteria were met
  • New features or changes to existing features are covered by tests, either unit (preferably) or behat
  • Update path is tested. New hook_updates should respect update order, right naming convention and consider hook_post_update code
  • Module can be safely uninstalled. Update/implement hook_uninstall and make sure that removed configuration or dependencies are removed/uninstalled
  • This pull request has all required labels (team/type/priority)
  • This pull request has a milestone
  • This pull request has an assignee (if applicable)
  • Any front end changes are tested on all major browsers
  • New UI elements, or changes on UI elements are approved by the design team
  • New features, or feature changes are approved by the product owner

After merge

  • Code is tested on all branches that it has been cherry-picked
  • Update hook number might need adjustment, make sure they have the correct order
  • The Drupal.org ticket(s) are updated according to this pull request status

Screenshots

N/A

Release notes

This will fix the bug related to group invite, where the user invited as mentioned as invitor.

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: high team: guardians labels Apr 15, 2024
@vcsvinicius vcsvinicius added this to the 12.3.4 milestone Apr 15, 2024
@vcsvinicius vcsvinicius requested a review from a team April 15, 2024 17:14
Copy link

mergeable bot commented Apr 15, 2024

Thanks for contributing towards Open Social! A maintainer from the @goalgorilla/maintainers group might not review all changes from all teams/contributors. Please don't be discouraged if it takes a while. In the meantime, we have some automated checks running and it might be that you will see our comments with some tips or requests to speed up the review process. 😊

@vcsvinicius vcsvinicius force-pushed the bugfix/3441126/wrong-language-configuration-for-original-language branch from e080031 to be4196c Compare April 15, 2024 17:32
@ronaldtebrake ronaldtebrake modified the milestones: 12.3.4, 12.3.5 Apr 23, 2024
@vcsvinicius vcsvinicius force-pushed the bugfix/3441126/wrong-language-configuration-for-original-language branch from 15510fd to 3f380ed Compare April 24, 2024 18:06
@vcsvinicius vcsvinicius force-pushed the bugfix/3441126/wrong-language-configuration-for-original-language branch from 3f380ed to 2557a87 Compare April 24, 2024 18:18
@vcsvinicius vcsvinicius force-pushed the bugfix/3441126/wrong-language-configuration-for-original-language branch from 2557a87 to 60c9081 Compare April 24, 2024 19:42
@vcsvinicius vcsvinicius force-pushed the bugfix/3441126/wrong-language-configuration-for-original-language branch from 5513d38 to 4c0a15f Compare April 26, 2024 13:33
@robertragas robertragas self-requested a review April 26, 2024 14:31
@vcsvinicius vcsvinicius force-pushed the bugfix/3441126/wrong-language-configuration-for-original-language branch from 4c0a15f to 196baf7 Compare April 30, 2024 12:03
@BiaInacio
Copy link
Contributor

Test done, tested with help of @vcsvinicius!
image

@vcsvinicius vcsvinicius merged commit 5e91473 into main May 3, 2024
190 checks passed
@vcsvinicius vcsvinicius deleted the bugfix/3441126/wrong-language-configuration-for-original-language branch May 3, 2024 17:43
@vcsvinicius
Copy link
Contributor Author

O cherry-picked to 12.3.x and 12.4.x branch

@ronaldtebrake ronaldtebrake added the backport: verified This pull request has been back ported to an older minor version label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport: verified This pull request has been back ported to an older minor version prio: high status: needs review This pull request is waiting for a requested review team: guardians type: bug Fixes a bug in Open Social
4 participants