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

Merge Requests

More

Recent comments

🇧🇪Belgium lobsterr

For it looks like a cache issues. So far we did a lot of testing of different features, I have never seen it

🇧🇪Belgium lobsterr

As far as I remember we had this issue, because of this bug:

https://github.com/LOBsTerr/drupal-superfish/issues/1

🇧🇪Belgium lobsterr

Thank you for your contribution

🇧🇪Belgium lobsterr

Tried to reproduce it on the different themes with settings without any success. Could you provide more context maybe ?
Drupal version, theme?

🇧🇪Belgium lobsterr

It looks like, this block of css there for ages, but it doesn't solve the issue.
I really don't understand why we need float: left for ul.sf-menu, which actually main source of the issue. I will drop it.

🇧🇪Belgium lobsterr

1) Since, we have already made manipulators alterable Make menu tree manipulators alterable Needs review , it is already possible to add it on your modules
2) I wanted to add a solution from #2 to the module by default, but since there is work in progress and they are changing the names of methods. I am not going to include
3) I like the approach to pass tree to a hook too, because Allow MenuLinkTree manipulators to be altered Needs work they also pass $tree to the event. So, let's add it too, but I propose to pass in the end to keep backward compatibility.

function my_module_superfish_manipulators_alter(array &$manipulators, $menu_name= NULL, &$tree = []) {
  if ($menu_name == 'main') {
    $manipulators[] = ['callable' => 'menu.language_tree_manipulator:filterLanguage'];
  }
}
🇧🇪Belgium lobsterr

Actually, it is a bug, we don't check accessibility of children, that is why children are displayed and we have menuparent class. I have done necessary changes.

🇧🇪Belgium lobsterr

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

🇧🇪Belgium lobsterr

We can't reproduce it. Could check it again? Maybe it was fixed in other issues ot provide more details which version of bootstrap, superfish and drupal is used

🇧🇪Belgium lobsterr

Unfortunately, my approach will have a blinking side effect for normal resolutions.
I have an idea, to render accordeon or select menus for the small screens and show/hide them using media queries, but it will take a lot of time to implement and there could be potential bugs :(

🇧🇪Belgium lobsterr

It looks like in the latest version it works exactly like this, please feel free to reopen it and provide more details, if it is still the case for you

🇧🇪Belgium lobsterr

Does anyone can provide more information how did it work on Drupal 7 version ?
1) There were kind of icons like arrows (what we have now) and on click it would open submenus ?
2) Or we completely disable parent link and handle onclick event to open submenus ?
3) Something else ?

🇧🇪Belgium lobsterr

Thank you for contribution the file Version was restored a new realease of library is tagged

🇧🇪Belgium lobsterr

I think these classes can be useful by default and we don't need config to enable/disable it.
The only thing I added prefix sf: sf-first, sf-last.

🇧🇪Belgium lobsterr

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

🇧🇪Belgium lobsterr

I have recently checked many times this. I have create to custom device in google development tools with resolution 768 and 765 and clearly see switch.

🇧🇪Belgium lobsterr

I am not sure what is the problem on your side, but by default the title is always displayed:

As you see I set for my menu description property "SOME DESCRIPTION" and it is correctly displayed:

<a href="/" title="SOME DESCRIPTION" class="is-active sf-depth-1 menuparent" role="menuitem" aria-haspopup="true" aria-expanded="false">subchild</a>

We have 2 options to manipulate title:

1) Disable hyperlink descriptions ("title" attribute) (Default: disabled)

If I check this option I will get the next result:

<a href="/" title="" class="is-active sf-depth-1 menuparent" role="menuitem" aria-haspopup="true" aria-expanded="false">subchild</a>

As you see the title is empty!

2) Insert hyperlink descriptions ("title" attribute) into hyperlink texts. (Default: disabled)

If I check this option I will get the next result:

<a href="/" title="" class="is-active sf-depth-1 menuparent" role="menuitem" aria-haspopup="true" aria-expanded="false">subchild <span class="sf-description">SOME DESCRIPTION</span></a>

as you can see description was added to a text of this link.

Could you explain what is the problem here then?

🇧🇪Belgium lobsterr

After my investigation of many classes which implement MenuLinkInterface

1) MenuLinkInterface expects string

  /**
   * Returns the localized title to be shown for this link.
   *
   * @return string
   *   The title of the menu link.
   */
  public function getTitle();

2) by default menu links are passed through DefaultMenuLinkTreeManipulators class:

$new_tree[(50000 + $instance->getWeight()) . ' ' . $instance->getTitle() . ' ' . $instance->getPluginId()] = $tree[$key];

As you can see in the core nothing special is done with getTitle method result and just a simple string is expected and not array. As a result I get warining:

Warning: Array to string conversion in Drupal\Core\Menu\DefaultMenuLinkTreeManipulators->generateIndexAndSort() (line 245 

From here I can conclude: yes, it works! because conversion of an array to string, but definitely it is not what expected. It is not a bug.

🇧🇪Belgium lobsterr

Thank you for your contribution

🇧🇪Belgium lobsterr

I have tested both "Menu Link Attributes" and "Link Attributes widget". They both have similar functionality.
I see that superfish module correctly uses classes and attributes provided by these modules.
I will close the ticket please feel free to open it, if it doesn't work for you and provide more details

🇧🇪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

Thank you for your contribution

Production build 0.71.5 2024