- Issue created by @lucuhb
- Status changed to Needs review
almost 2 years ago 11:24am 23 January 2023 - 🇫🇷France lucuhb
That's Ok now, no more error when I remove a role. Thanks !
- Assigned to Grimreaper
- Issue was unassigned.
- Status changed to Postponed: needs info
almost 2 years ago 1:58pm 16 February 2023 - 🇫🇷France Grimreaper France 🇫🇷
Hi,
I can't reproduce the problem.
$this->authorized_roles
, as well as$this->authorized_users
for the case of user deletion, are empty arrays if I have not set specific roles or users to access the channel. And empty arrays do not provoke errors.If you read the error message, it is written:
expects parameter 2 to be array, null given
So I guess that authorized_roles is not set at all in your channel configuration.
This is coming from a change introduced in 8.x-3.0-rc2 #3211003: Add more options for channel access → , which required to execute post_update hooks to ensure configuration is in a good state.
Have you tried to resave your channels configuration before deleting your role?
- Status changed to Closed: cannot reproduce
almost 2 years ago 10:33am 17 February 2023 - 🇫🇷France Grimreaper France 🇫🇷
Closing to clean up the issues queue.
Feel free to re-open if able to provide steps to reproduce starting from a fresh standard Drupal install.
- 🇫🇷France lucuhb
Hello,
Having no role configured in a channel should not cause an error when a role is removed.
- 🇫🇷France Grimreaper France 🇫🇷
Hi,
Having no role configured in a channel should not cause an error when a role is removed.
Absolutely, and this is not in opposition of what I had written in comment 6.
So I guess that authorized_roles is not set at all in your channel configuration.
This sentence does not mean you have no role configured in your channel, this means that I think the current config structure in your channels entity is not the expected one and you hould try to resave it and see if a difference appear.