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

Comments

hatsch created an issue. See original summary.

hatsch’s picture

hatsch’s picture

Issue summary: View changes
hatsch’s picture

Status: Active » Needs review
olivierg’s picture

Assigned: Unassigned » olivierg
Status: Needs review » Reviewed & tested by the community

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

  • OlivierG committed 67d99a4 on 1.0.x
    Issue #3268531 by hatsch: Class not found Error on Template edit, patch...
olivierg’s picture

Status: Reviewed & tested by the community » Fixed
olivierg’s picture

Status: Fixed » Closed (fixed)
hatsch’s picture

Hi Oliver,
Thanks for your response!
You're right for the Interface Namespace.
Problem there seems to be the lowercase entity as well.

olivierg’s picture

You can update to alpha2 version to use last release.

rogeriocc’s picture

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