Account created on 10 November 2009, over 15 years ago
#

Merge Requests

More

Recent comments

🇧🇪Belgium lobsterr

I think you are looking for this method 'loadByEntity' :

This an example how you can use it.

$group_relationships = GroupRelationship::loadByEntity($term);

foreach($group_relationships  as $group_relationship) {
   $group = $group_relationship->getGroup();
   if ($group->hasPermission('view group_term:tags entity', $account)) {
       // Do something here.
   }
}
🇧🇪Belgium lobsterr

Hi, you need to check if user has permission "view group_term:tags entity" (in this case I have tags taxonomy vocabulary enabled as a plugin in my group type). You can do it like this:

$group->hasPermission('view group_term:tags entity', $account);

The same way you can check any other permissions like edit, delete:

$group->hasPermission('update any group_term:tags entity', $account);
🇧🇪Belgium lobsterr

The problem was solved in this ticket 🐛 Last Enabled Menu Item Shows As Expandable with No Children Active . Thank you for reporting

🇧🇪Belgium lobsterr

Rollbacked changes to add li element item classes. It solves the issue. Thank you for your contribution

🇧🇪Belgium lobsterr

Thank you for your contribution

🇧🇪Belgium lobsterr

lobsterr made their first commit to this issue’s fork.

🇧🇪Belgium lobsterr

Well, probably. it is repo cache issue. I am closing this ticket since it has been fixed in 4.0.4

I just tried to install, everything is fine, clean composer cache too:

Installing dependencies from lock file (including require-dev)
Package operations: 4 installs, 0 updates, 0 removals
  - Downloading drupal/entity (1.6.0)
  - Downloading drupal/flexible_permissions (2.0.1)
  - Downloading drupal/group (3.3.4)
  - Downloading drupal/groupmedia (4.0.4)
🇧🇪Belgium lobsterr

You can use this token [group_content:group:title] or [group_relationship:group:title]

🇧🇪Belgium lobsterr

Hi, @rreedy, you are right it was an accident, I haven't finished to work on it :(

🇧🇪Belgium lobsterr

This code comes from group module:

      // This could be in its own decorator, but then it would live in a module
      // of its own purely for field_ui support. So let's keep it here.
      if ($this->moduleHandler->moduleExists('field_ui')) {
        $relationship_type = $this->entityTypeManager()->getStorage('group_relationship_type')->load($relationship_type_id);
        $operations += field_ui_entity_operation($relationship_type);
      }

field_ui_entity_operation comes from field_ui module. Are you sure it is available ?

🇧🇪Belgium lobsterr

I checked also with Group 2.0 and Group media 3.0 and it works as expected

🇧🇪Belgium lobsterr

I tried to reproduce, without success.

1) When we remove the group it calls the next code:

  public static function preDelete(EntityStorageInterface $storage, array $entities) {
    // Remove all relationships from these groups as well.
    foreach ($entities as $group) {
      assert($group instanceof GroupInterface);
      foreach ($group->getRelationships() as $relationship) {
        $relationship->delete();
      }
    }
  }

It will remove all group relationships. What happens on my side and I see that the data also removed from group_relationship_field_data.
Also I noticed that GroupContentAccessControlHandler, it looks like you are using Group 2.0 and groupmedia 3.0. Right ?

🇧🇪Belgium lobsterr

Thank you for your contribution. I have added a fix

🇧🇪Belgium lobsterr

Unfortunately, I can't reproduce this issue, I understand that is a quite old issue, plus we have a lot of changes since then, I will keep it for awhile just to be sure nobody else has it.

🇧🇪Belgium lobsterr

Thank you for your contribution.

I have added a fix in drupal-superfish library, it will be available in the next release.

🇧🇪Belgium lobsterr

Thank you for your contribution

🇧🇪Belgium lobsterr

lobsterr made their first commit to this issue’s fork.

🇧🇪Belgium lobsterr

I will explain how expanded options are working.
1) By default no "Show as expanded" option from a menu item is taking account. It means the menu will be displayed with ALL submenus!
2) In order to take into account any expanded option we need to use "Take "Expanded" option into effect.". In this case we take into account "Show as expanded" and show children if it is checked.
3) I have fixed saving of "Expand all menu links", if this option is checked an option "Show as expanded" of any menu item will be ignored

🇧🇪Belgium lobsterr

ok, I was wrong. Ignore my previous comment, I need more time to understand, how it should work.

🇧🇪Belgium lobsterr

I have done the investigation.

This option "Take "Expanded" option into effect." is supposed to work with many other options like:
- Enable multi-column sub-menus.
- Start from depth.
- Levels.
- Add cloned parent links to the top of sub-menus.

It is very special case, I am not sure that a lot of sites actually using it, but we will keep it just in case they do and I don't want to invest my time to a feature, which used very rarely.

I have fixed saving "Expand all menu links" and I will try to implement now solution for it.

🇧🇪Belgium lobsterr

I added all "out" effects

🇧🇪Belgium lobsterr

@xenophyle 📌 Use Once method in JS behavior Active
We have added once instruction into dev branch, could you check if it fixes your bug?

🇧🇪Belgium lobsterr

Thank you for your contribution

🇧🇪Belgium lobsterr

lobsterr made their first commit to this issue’s fork.

🇧🇪Belgium lobsterr

I added a fix and I will introduce a new release soon

🇧🇪Belgium lobsterr

Thank you it was fixed. I will introduce a new release soon

🇧🇪Belgium lobsterr

Thank you for your contribution

🇧🇪Belgium lobsterr

how many rows do you in the tables you are trying to join ?

🇧🇪Belgium lobsterr

Entity id can be not only int

🇧🇪Belgium lobsterr

No, upgrade path is required, in this case we don't change the name of the plugins. The most likely it is a cache issue.
I switched from annotations to php attributes

🇧🇪Belgium lobsterr

Thank you for contribution

🇧🇪Belgium lobsterr

I will take care of it soon, it is one the next module in my list

🇧🇪Belgium lobsterr

Did you provide your editor roles permissions to create this Group type ?
I was able to create an example:
1) Editors can create a subgroup, because we provide rights to manage Subgroup relationships
2) Editors can edit/delete group, because we provide rights for specific group

🇧🇪Belgium lobsterr

@brad you can still assign permissions to edit/delete group on subgroup type level

🇧🇪Belgium lobsterr

It is a group module restriction.
It doesn't allow to provide entity access for group types.

https://git.drupalcode.org/project/group/-/blame/3.3.x/src/Plugin/Group/...

I am checking it, what we can do

🇧🇪Belgium lobsterr

I tried both options with admins and without. It works for me. I wonder what version of Drupal do you use ?

🇧🇪Belgium lobsterr

I have tested it and I couldn't not reproduce. Have you tried to debug it deeper or try on the fresh instance ?

BTW You have to use a link with hash code and not with email.

🇧🇪Belgium lobsterr

lobsterr made their first commit to this issue’s fork.

🇧🇪Belgium lobsterr

I have updated the code with latest changes from RC branch, plus renamed the classes to keep the same naming everywhere

🇧🇪Belgium lobsterr

So, I have rerolled the latest patch and also renamed denylist to ignore. As it was suggested in here Ignore specific paths Needs work

Please use PR from this point

🇧🇪Belgium lobsterr

So, Actually, to add user to a group we are using Group::addMember and inside we have such code:

    $storage = $this->relationshipStorage();
    $relationship = $storage->createForEntityInGroup($entity, $this, $plugin_id, $values);
    $storage->save($relationship);
    return $relationship;

So, as you see the $relationship doesn't not validate the entity and that is why it allows to add user and doesn't respect cardinality settings.
it is a bug on group module :(

Production build 0.71.5 2024