Closed (fixed)
Project:
Nodeaccess
Version:
8.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
8 Sep 2020 at 08:59 UTC
Updated:
2 Oct 2021 at 08:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
alisonHi there,
D9 compatibility isn't stable yet, I'm afraid -- and, individual node permissions is one of the elements that's less finished than other pieces:
https://www.drupal.org/project/nodeaccess/issues/3130778#comment-13640220
I'm going to rename this issue, and add it to the D9 readiness issue as a blocker. I don't have the capacity to do more than that at this point in time, but at least it'll be recorded / organized. Thank you for your report!
Comment #3
alisonComment #4
HitbyThanks Alison,
I'm not too far along so I'll rebuild in D8. It was always a risk jumping ahead.
Comment #5
waspper commentedIt would be useful to get https://www.drupal.org/project/nodeaccess/issues/3070372 first. This, because some important changes are introduced there, and seems they will be needed here.
Comment #6
waspper commentedJust a note: For this issue, check please comment at https://www.drupal.org/project/nodeaccess/issues/3070372#comment-13837951. If patch/solution is provided there, then this issue could be solved in same commit.
Comment #7
waspper commentedAt the end, if needed here, it's just about adding one more line. So, after discussing at https://www.drupal.org/project/nodeaccess/issues/3070372#comment-13837971, I'll provide 2 versions here:
3169639-7.patch: Normal patch on this issue, without any change.
3169639-7-apply-for-issue-3070372-15.patch: To appy AFTER patch https://www.drupal.org/project/nodeaccess/issues/3070372#comment-13837708 (#15).
Comment #8
waspper commentedComment #9
pvasener commentedLine added in the Patch #7 fixed the problem for me.
Comment #10
gantal commentedThe patch in #7 (adding
$node->save()) worked for me as well.Comment #11
balis_m commentedPatch from #7 worked for me too.
Comment #12
balis_m commentedI' m sorry for changing the issue status again. I found out that the patch from #7 not working when I try to remove node permissions.
I solved it with this patch.
Comment #13
dasginganinjaThe patch in #12 worked swimmingly for me. The patch in #7 exhibited the same behavior that was noted in #12.
+1 RTBC so we can get a tagged D9 module!
Comment #14
alisonThank you for all the work on this issue, everybody!
I haven't tested the actual bug fix part of this patch, I'm just commenting to report that it applies cleanly alongside the latest patch for D9 deprecated code fixes.
I'd love to hear from some folks from earlier in the thread about the latest version of the patch, if possible -- it's nerveracking to commit a patch on a module when I'm not in a position to do manual testing, and it doesn't have automated tests for D8, and it's already so janky.
If we don't get more reviews before the deprecated code fixes are ready to commit/release, my plan is to release the D9 compatible version without this fix, and then immediately commit this to dev, so at least it won't be in a tagged release right away -- better chances of hearing about whether it ended up causing regressions.
Comment #15
jungleManually tested #12 with a fresh Drupal 8.9.19 standard installation
Before: after saving, it shows nothing.
After: It does show saved grants, but it's incorrect. The reason is another code issue in
\Drupal\nodeaccess\Form\GrantsForm::buildForm()from the line 70 to 87 below.Comment #16
jungleContinue with #15
1.
$acountswith a typo should be$accountsby guessing from the context. It may bewhile ($account = $results->fetchAssoc()) {, or the variable$accountin the next line is undefined.2. Meanwhile,
$account->uidis accessing an object, So,$results->fetchAssoc()should be$results->fetchObject()3. Furthermore,
$query->fields('ufd', ['name']);should be$query->fields('ufd', ['name', 'uid']);to return theuid, or$account->uidin$form_values['uid'][$account->uid]is undefined again.The extra patch looks like the following which was posted to both #3061378: Table name typo? and #3185156: Permission to individual Users throws error on grants tab of nodes
Comment #17
jungleCombined with the patch mentioned in #16, manually tested it again, it works as expected
Comment #18
jungleShould be replaced with Dependency injection. This is not the only one that needs work. Tagging
Needs followup. Let's do it in another one.Uploading the new patch. As the extra changes are just two lines of code. I'd keep it as RTBC, and I will commit it next with the confidence got from the manual tests above.
Comment #20
jungleComment #21
jungle