🇮🇳India @ramreddy.kancherla

Account created on 12 June 2014, over 10 years ago
#

Recent comments

🇮🇳India ramreddy.kancherla

Hi @Udhaya Kumar, did you resolve this issue?
I am facing same issue. If you resolve this issue, please provide steps.
Thank you.

🇮🇳India ramreddy.kancherla

@tim-diels
Drupal version is : 10.1.4
Below is the interidff:

--- <unnamed>
+++ <unnamed>
@@ -221,7 +221,7 @@
 +  // Status in user add/edit from group.
 +  if ($field_definition->getName() == 'status' && $items->getEntity()->getEntityTypeId() == 'user') {
 +    $entity = $items->getEntity();
-+    if (!$entity->isAnonymous()) {
++    if ($entity->id() && !$entity->isAnonymous()) {
 +      $group_content_entities = \Drupal::entityTypeManager()->getStorage('group_content')->loadByProperties(['entity_id' => $entity->id()]);
 +      foreach ($group_content_entities as $group_content) {
 +        // Allow if can edit any.
🇮🇳India ramreddy.kancherla

After applying #43 patch file with 8.x-1.6 version, getting error on user register page(admin/people/create).

Drupal\Core\Database\InvalidQueryException: Query condition 'group_content_field_data.entity_id IN ()' cannot be empty. in Drupal\Core\Database\Query\Condition->condition() (line 106 of /var/www/html/docroot/core/lib/Drupal/Core/Database/Query/Condition.php).

Updated patch to support 8.x-1.6 and now I am able to create/edit user without any error.

Production build 0.71.5 2024