Closed (fixed)
Project:
Simple Access
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
3 Jun 2020 at 22:32 UTC
Updated:
29 May 2024 at 03:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
rik-dev commentedComment #3
msutharsUpdated the patch.
Comment #4
stanleyfernandesComment #5
stanleyfernandesAfter applying the patch for Simple Access on Drupal 9.0.2 but after checking the module and pressing install it throws this exception.
Uncaught PHP Exception Drupal\Core\Config\Schema\SchemaIncompleteException: "Entity type 'Drupal\Core\Config\Entity\ConfigEntityType' is missing 'config_export' definition in its annotation" at C:\wamp64\www\dia\core\lib\Drupal\Core\Config\Entity\ConfigEntityBase.php line 251Comment #6
Pooja Ganjage commentedHi,
I am applying patch for the issue #5 comment.
Kindly review this patch once.
Thanks.
Comment #7
Pooja Ganjage commentedComment #8
Pooja Ganjage commentedHi,
Attached updated patch.
Kindly review this patch once.
Thanks.
Comment #9
stanleyfernandesTested the patch provided in comment #8, but there was issue with path as to how the patch was generated. Attached the issue image.
Comment #10
stanleyfernandesWorked on fixing the paths as per the comment no #9
Working patch is attached.
Comment #11
joshua1234511Test the patch provided #10.
Working as Expected.
Comment #14
damienmckennaFYI I created the merge request so that I could load the project using Composer, and I had to add a composer.json file to make it work. Besides the new composer.json file, the code is identical to #10.
Comment #15
damienmckennafyi you can get a diff of the merge request, the equivalent of a patch file, by clicking the "plain diff" link.
Comment #16
tinytina commentedHi,
i've tested 8.x-3.0-alpha7 with patch #10 in Drupal 9.0.9.
With this setup i get some errors in "Groups" and "Edit Group" pages.
"Edit Group"-Form:
Opening the edit form shows: "Warning: Invalid argument supplied for foreach() in Drupal\Core\Render\Element\Checkboxes::valueCallback() (line 100 of core\lib\Drupal\Core\Render\Element\Checkboxes.php)...."
The selection of roles is not saved. (Steps to reproduce: create new group, select all roles, save, edit group again, no role is selected) So the module can't work at all.
It seems be a naming issue, ('roles' -> 'access') i tried to fix in the attatched patch.
"Groups"-Page:
The "ROLES" column is always empty. There are several warnings/notices on the page:
Drupal\simple_access\Controller\SimpleAccessGroupListBuilder->buildRow(Object) (Line: 130)
Drupal\simple_access\Controller\SimpleAccessGroupListBuilder->buildRow(Object) (Line: 130)
Drupal\simple_access\Controller\SimpleAccessGroupListBuilder->buildRow(Object) (Line: 130)
Drupal\simple_access\Controller\SimpleAccessGroupListBuilder->buildRow(Object) (Line: 130)
Any ideas on how to fix this?
Comment #17
ljwilson commentedThis week I updated a Drupal 8.9.16 site to 9.1.10. After applying patches #10 and #16, I had the same errors mentioned in comment #16.
The attached patch fixed the "Groups"-Page errors seen in #16 for me.
...jack
Comment #18
ljwilson commentedFound one more issue. Started getting this in the log:
Notice: Undefined property: Drupal\simple_access\Entity\SimpleAccessGroup::$roles in Drupal\simple_access\Entity\SimpleAccessGroup->canManageAccess() (line 113 of D:\inetpub\wwwroot\onestop\web\modules\contrib\simple_access\src\Entity\SimpleAccessGroup.php)and this:
Warning: array_intersect(): Expected parameter 2 to be an array, null given in Drupal\simple_access\Entity\SimpleAccessGroup->canManageAccess() (line 113 of D:\inetpub\wwwroot\onestop\web\modules\contrib\simple_access\src\Entity\SimpleAccessGroup.php)Changed a couple of other places where access needed to be referenced instead of roles.
...jack
Comment #19
ljwilson commentedThis new site is still in qa mode, and had a lot of use of this module during testing so I was able to trap a few more issues.
Two were null values instead of [], and one was another roles->access renaming issue.
...jack
Comment #21
frobIs there any hope of a Drupal 9+ version of this module getting released? The Drupal 8 version has dropped off the project page.
Comment #22
earthangelconsulting commentedyes please, maintainers! let us know if this is actually going to make it to Drupal 9 / 10 or if it has been abandoned, or... what?
it seems that i COULD download (or install via Composer, if it permits it) this release https://www.drupal.org/project/simple_access/releases/8.x-3.0-alpha7 (committed 25 Sept, 2021, according to #20 ) and... then what? do i still need to apply this patch https://www.drupal.org/files/issues/2021-06-19/drupal-9-readiness-314550... (#19) or has that now been merged in? i am guessing the latter. but does it work?
the elephant in the room: if this module is even remotely capable of working under D9, why is there no D8 or D9 versions shown on the main module page? (i only found the 8.x-2.0-alpha7 module in the https://www.drupal.org/project/simple_access/releases page )
if this porting to D9/10 is totally abandoned, it would be great if the maintainers could just tell us so! :-)
Also, since they understand the original intent behind the module, and what other options there are for access control, if this module is actually abandoned for D9/10... what would be the recommended way of accomplishing the same in D9? i am relatively new to D9 but i don't think this is in Core. what module should be used instead?
Comment #23
larowlanComment #24
larowlanThis seems to get things at least past WSODs everywhere. And lets you add a group and profile, and apply it to a node - and the access is blocked properly.
Still lots to do, e.g. there's still a simpletest .test file that should be ported to BTB
Comment #26
acbramley commentedPicking up from #24 and getting this into shape in a new branch on the fork.
Will setup Gitlab CI and port tests to BTB
Comment #27
acbramley commentedComment #29
mahtab_alam commentedComment #30
acbramley commented@mahtab_alam did you mean to change the status? This is still a work in progress...
Tests are now passing but they should really be expanded to cover more functionality.
Comment #33
acbramley commentedMerged into the new 4.x branch which only supports Drupal 10. Since 8.x-3.x uses the old branch name format and was the D8 branch I wanted to leave that behind.
A 4.x dev release and alpha are to follow.