Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rik-dev created an issue. See original summary.

rik-dev’s picture

Status: Active » Needs review
StatusFileSize
new362 bytes
msuthars’s picture

StatusFileSize
new1.08 KB

Updated the patch.

stanleyfernandes’s picture

Assigned: Unassigned » stanleyfernandes
stanleyfernandes’s picture

Status: Needs review » Needs work
Issue tags: +DIACWJuly2020

After 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 251

Pooja Ganjage’s picture

StatusFileSize
new1.78 KB

Hi,

I am applying patch for the issue #5 comment.

Kindly review this patch once.

Thanks.

Pooja Ganjage’s picture

Status: Needs work » Needs review
Pooja Ganjage’s picture

StatusFileSize
new1.77 KB

Hi,

Attached updated patch.

Kindly review this patch once.

Thanks.

stanleyfernandes’s picture

Status: Needs review » Needs work
StatusFileSize
new59.87 KB

Tested the patch provided in comment #8, but there was issue with path as to how the patch was generated. Attached the issue image.

stanleyfernandes’s picture

Status: Needs work » Needs review
StatusFileSize
new1.52 KB

Worked on fixing the paths as per the comment no #9
Working patch is attached.

joshua1234511’s picture

Assigned: stanleyfernandes » Unassigned
Status: Needs review » Reviewed & tested by the community
Issue tags: -DIACWJuly2020
StatusFileSize
new13.66 KB

Test the patch provided #10.
Working as Expected.

DamienMcKenna made their first commit to this issue’s fork.

damienmckenna’s picture

FYI 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.

damienmckenna’s picture

fyi you can get a diff of the merge request, the equivalent of a patch file, by clicking the "plain diff" link.

tinytina’s picture

StatusFileSize
new1.32 KB

Hi,

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:

  • Notice: Undefined property: Drupal\simple_access\Entity\SimpleAccessGroup::$roles in Drupal\simple_access\Controller\SimpleAccessGroupListBuilder->buildRow() (line 45 of modules\contrib\simple_access\src\Controller\SimpleAccessGroupListBuilder.php).
    Drupal\simple_access\Controller\SimpleAccessGroupListBuilder->buildRow(Object) (Line: 130)
  • Warning: array_filter() expects parameter 1 to be array, null given in Drupal\simple_access\Controller\SimpleAccessGroupListBuilder->buildRow() (line 45 of modules\contrib\simple_access\src\Controller\SimpleAccessGroupListBuilder.php).
    Drupal\simple_access\Controller\SimpleAccessGroupListBuilder->buildRow(Object) (Line: 130)
  • Warning: array_intersect_key(): Expected parameter 2 to be an array, null given in Drupal\simple_access\Controller\SimpleAccessGroupListBuilder->buildRow() (line 45 of modules\contrib\simple_access\src\Controller\SimpleAccessGroupListBuilder.php).
    Drupal\simple_access\Controller\SimpleAccessGroupListBuilder->buildRow(Object) (Line: 130)
  • Warning: implode(): Invalid arguments passed in Drupal\simple_access\Controller\SimpleAccessGroupListBuilder->buildRow() (line 45 of modules\contrib\simple_access\src\Controller\SimpleAccessGroupListBuilder.php).
    Drupal\simple_access\Controller\SimpleAccessGroupListBuilder->buildRow(Object) (Line: 130)

Any ideas on how to fix this?

ljwilson’s picture

StatusFileSize
new808 bytes

This 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

ljwilson’s picture

StatusFileSize
new1.15 KB

Found 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

ljwilson’s picture

StatusFileSize
new2.58 KB

This 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

frob’s picture

Is there any hope of a Drupal 9+ version of this module getting released? The Drupal 8 version has dropped off the project page.

earthangelconsulting’s picture

yes 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?

larowlan’s picture

Title: Drupal 9 Readiness » Drupal10 Readiness
larowlan’s picture

StatusFileSize
new5.1 KB

This 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

acbramley changed the visibility of the branch 3145500-drupal-9-readiness to hidden.

acbramley’s picture

Status: Reviewed & tested by the community » Needs work

Picking up from #24 and getting this into shape in a new branch on the fork.

Will setup Gitlab CI and port tests to BTB

acbramley’s picture

mahtab_alam’s picture

Status: Needs work » Needs review
acbramley’s picture

Assigned: Unassigned » acbramley
Status: Needs review » Needs work

@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.

  • acbramley committed d735050f on 4.x
    Issue #3145500 by acbramley, larowlan, gordon: Drupal10 Readiness
    

acbramley credited gordon.

acbramley’s picture

Status: Needs work » Fixed

Merged 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.