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 #3407056 by nkoporec: Error: Call to a member function get() on null Drupal\\social_activity\\EmailTokenServices->getUserPreview() #3638

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

nkoporec
Copy link
Contributor

@nkoporec nkoporec commented Dec 8, 2023

Problem

When expecting logs we found the following error, popping up multiple times:

Error: Call to a member function get() on null Drupal\social_activity\EmailTokenServices->getUserPreview() (line 251 of /app/html/profiles/contrib/social/modules/social_features/social_activity/src/EmailTokenServices.php)

Solution

Make sure that the field exists before calling get()

Issue tracker

https://www.drupal.org/project/social/issues/3407056

Theme issue tracker

[Required if applicable] Paste a link to the drupal.org theme issue queue item, either from socialbase or socialblue. If any other issue trackers were used, include links to those too.

How to test

  • Install Open Social
  • Create a group and add group members
  • Send an email to group members and use a token in the email

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

Release notes

Fixed an undefined error that occurred when sending out emails with tokens.

Change Record

Translations

@nkoporec nkoporec added type: bug Fixes a bug in Open Social status: needs review This pull request is waiting for a requested review prio: low team: guardians labels Dec 8, 2023
@nkoporec nkoporec added this to the 12.0.1 milestone Dec 8, 2023
Copy link

mergeable bot commented Dec 8, 2023

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 self-requested a review December 13, 2023 17:47
Copy link
Contributor

@vcsvinicius vcsvinicius left a comment

Choose a reason for hiding this comment

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

@nkoporec I add an assignment

@nkoporec nkoporec force-pushed the issue/call-to-member-get-on-null branch from 52f6fb9 to 5a9b922 Compare December 14, 2023 17:59
@nkoporec
Copy link
Contributor Author

@vcsvinicius this is ready for re-review

Copy link
Contributor

@vcsvinicius vcsvinicius left a comment

Choose a reason for hiding this comment

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

@nkoporec I approved the PR

@ronaldtebrake ronaldtebrake merged commit 53404df into main Dec 20, 2023
186 checks passed
@ronaldtebrake ronaldtebrake deleted the issue/call-to-member-get-on-null branch December 20, 2023 07:24
@ronaldtebrake
Copy link
Contributor

Also cherry-picked to 12.1.x and 12.0.x

@ronaldtebrake ronaldtebrake added backport: verified This pull request has been back ported to an older minor version and removed status: needs review This pull request is waiting for a requested review labels Dec 20, 2023
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: low team: guardians type: bug Fixes a bug in Open Social
Development

Successfully merging this pull request may close these issues.

3 participants