Notice: Undefined index: in findRequiredModules() (line 113 of sites/all/modules/contrib/configuration/lib/Drupal/configuration/Config/PermissionConfiguration.php).

After enabling tracking of a Previewable email templates I am getting the warning above. The template seems to have been copied over from the dev site though when I ran a sync.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

LiamPower created an issue. See original summary.

LiamPower’s picture

I propose a check to make sure the index exists

public function findRequiredModules() {
     $perm_modules = user_permission_get_modules();
-    $this->addToModules($perm_modules[$this->data['permission']]);
+    if (isset($perm_modules[$this->data['permission']])) {
+      $this->addToModules($perm_modules[$this->data['permission']]);
+    }
   }
LiamPower’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: unidentified_index_in-2636808-2.patch, failed testing.

LiamPower’s picture

Hopefully fixed the patch file

LiamPower’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 5: unidentified_index_in-2636808-5.patch.patch, failed testing.

khaled.zaidan’s picture

Just fixed the patch by Liam to pass the automated test

khaled.zaidan’s picture

Status: Needs work » Needs review
scott.whittaker’s picture

Patch in #8 works for me.

LiamPower’s picture

Status: Needs review » Reviewed & tested by the community

Patch #8 also works for me