Problem/Motivation
editing an existing template throws an error:
Error: Class "Drupal\group_permissions_template\entity\GroupRoleDecorator" not found in Drupal\group_permissions_template\Form\GroupPermissionsTemplatePermissionForm->getGroupRoles()
Steps to reproduce
edit an existing template
Proposed resolution
- use Drupal\group_permissions_template\entity\GroupRoleDecorator;
+use Drupal\group_permissions_template\Entity\GroupRoleDecorator;
and add
use Drupal\group_permissions_template\Entity\GroupRoleDecoratorInterface;
in GroupRoleDecorator
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | group_permissions_template-fix-class-not-found-3268531-1.patch | 1.23 KB | hatsch |
Comments
Comment #2
hatsch commentedComment #3
hatsch commentedComment #4
hatsch commentedComment #5
olivierg commentedHi hatsch,
Add the interface "use Drupal\group_permissions_template\Entity\GroupRoleDecoratorInterface;" is useless cause class and interface are in the same namespace.
Thank you for your patch, I will create a new version today.
Comment #7
olivierg commentedComment #8
olivierg commentedComment #9
hatsch commentedHi Oliver,
Thanks for your response!
You're right for the Interface Namespace.
Problem there seems to be the lowercase entity as well.
Comment #10
olivierg commentedYou can update to alpha2 version to use last release.
Comment #11
rogeriocc commentedHi OlivierG,
in alpha2 with Drupal 9.2.10 it keeps giving the error without interface, i don't know why.In my test with Drupal 9.3.9 the error does not happen without the interface."use Drupal\group_permissions_template\Entity\GroupRoleDecoratorInterface;in GroupRoleDecorator"
Update:
Eu penso que tem a ver com a versão do PHP, no Drupal 9.2.10 está rodando 7.4.7 e o Drupal 9.3.9 está rodando com PHP 7.4.13.
Vou testar e reposto aqui.