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 #3085176: move social_post_update hook to post_update #1529

Merged
merged 1 commit into from Oct 2, 2019

Conversation

jaapjan
Copy link
Contributor

@jaapjan jaapjan commented Oct 2, 2019

Problem

The function social_post_update_8601 is being executed with every database update. Because the module is called social_post Drupal actually thinks its a hook_post_update. See: https://www.drupal.org/project/drupal/issues/2880361

Solution

It’s changing configuration, this should happen in a post_update hook and not an update hook. So moving it to social_post_post_update_8601_administer_post_permissions in social_post.post_update.php solves the issue for now.

Issue tracker

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

How to test

  • Run database update hooks. Notice social_post is only executing once.

Release notes

Due to naming conventions the social_post_update_8601 was being executed in every database update. We've moved the function to a post_update so it should only execute once.

@jaapjan jaapjan added type: refactoring Updates code for improved maintenance without changing its functionality backport: verified This pull request has been back ported to an older minor version shipsters labels Oct 2, 2019
@jaapjan jaapjan added this to the 7.0 milestone Oct 2, 2019
@jaapjan
Copy link
Contributor Author

jaapjan commented Oct 2, 2019

Does not need to be in 6.x I think?

@Kingdutch Kingdutch self-requested a review October 2, 2019 12:06
@jaapjan jaapjan merged commit e6d975c into 8.x-7.x Oct 2, 2019
@jaapjan jaapjan deleted the feature/3085176 branch October 2, 2019 14:47
@jaapjan
Copy link
Contributor Author

jaapjan commented Oct 2, 2019

Only in 7.x 🚀

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 type: refactoring Updates code for improved maintenance without changing its functionality
3 participants