-
Notifications
You must be signed in to change notification settings - Fork 3
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
fix(SHS-6113): duplicate node access records due to bug in su_humsci_profile_update_9723() #1765
fix(SHS-6113): duplicate node access records due to bug in su_humsci_profile_update_9723() #1765
Conversation
…profile_update_9723()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this locally and it works. I just have a few formatting suggestions / requests. I am not going to hold this up from getting into the deployment on Wednesday for them.
It definitely appears the array_push
in the previous update is the culprit and running array_unique
solves the duplication.
I also double checked the custom module and didn't see anything concerning there: https://git.drupalcode.org/project/content_access_simple/-/blob/main/content_access_simple.module
docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.install
Outdated
Show resolved
Hide resolved
docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.install
Outdated
Show resolved
Hide resolved
docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.install
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @dalin-
Here's a fix (I don't have permission to undelete this branch): |
Summary
Some update hooks to clean up duplicate node_access records that caused fatal exceptions. Those dupes were caused because not all sites had per-node Content Access enabled. So these updates enforce that for the Private Page node type.
Need Review By (Date)
ASAP. We need to prevent other people from experiencing fatal exceptions in the live environment.
Urgency
high
Steps to Test
drush updb
and observe the output forsu_humsci_profile_update_9725()
andsu_humsci_profile_update_9726()
On some sites you'll see output for 9725 to say that it enforced per-node Content Access. I haven't found a site that made any changes in 9726 (I suspect that the
node_access_rebuild()
called at the end of the previous update fixed those problems already).Review Tasks
Backend / Functional Validation
Code
snake_case
and notcamelCase
?Code security
General