Problem/Motivation

I get the following warning when installing commerce_recruiting:

Undefined array key "commerce_recruiting" PermissionHandler.php:228

Steps to reproduce

Proposed resolution

add commerce_recruiting.permissions.yml

Remaining tasks

User interface changes

API changes

Data model changes

Comments

socialnicheguru created an issue. See original summary.

socialnicheguru’s picture

StatusFileSize
new0 bytes
socialnicheguru’s picture

Status: Active » Needs review
StatusFileSize
new1.95 KB
socialnicheguru’s picture

StatusFileSize
new2.92 KB

Last two were incomplete and had errors

ktpm’s picture

Hi,

just wanted to give a quick summary feedback on this, also including #3339355 and #3532677.

Commerce Recruiting is an extension module for Commerce. As it has Commerce as dependency, that module is required in order to install Recruiting in the first place, so the CommerceContentEntityBase class is supposed to be there (#3532677). Given that, I'm struggling on how to get to these issues or how to solve them.

The permissions are generated implicitly via the Entity module, which itself is a dependency of Commerce so there is no need for a permissions.yml file. These permissions there are never used by the module.

Of course you can just keep using the patches if they are helping, but as I see it they should not be needed at all.

socialnicheguru’s picture

Status: Closed (cannot reproduce) » Needs review

This is because of autoload. I am getting these errors before even installing the module. That is the point. It is autoloading commerce_recruiting which depends on commerce which is not autoloaded or even enabled. Why is there a need for autoload?

#3532677: Uncaught Error: Class "Drupal\commerce\Entity\CommerceContentEntityBase" not found

The point is that commerce is not enabled yet.

in composer.json -

  "autoload": {
    "psr-4": {
      "Drupal\\commerce_recruiting\\": "./src"
    }

I am getting the errors because autoloading is working and I have not installed commerce_recruiting yet and it makes a call to commerce which is neither enabled nor autoloaded.

ktpm’s picture

Status: Needs review » Fixed
Related issues:

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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