Account created on 1 July 2008, over 16 years ago
#

Merge Requests

Recent comments

🇫🇮Finland phonkala

It purely depends on this property "Group creator must complete their membership" of group module.

I guess you mean "The group creator automatically becomes a member"?

I made 20+ combinations of Parent and Child groups to test this with different settings, even added relationship fields for some combinations, and for me the Child group default membership is only created when:

1. The Child group type has the option "The group creator automatically becomes a member" checked.
2. AND the Child group type DOES NOT HAVE the option "Group creator must complete their membership" checked.

I did a new, fresh Drupal 10 install just before testing this, but this is exactly how it behaves in my actual Drupal project too. There is no custom code related to this, and obviously not in the fresh Drupal install either. The "Group creator must complete their membership" option in the Parent (group) > Content > Subgroup (plugin) did not matter at all.

So for me the issue was having that "Group creator must complete their membership" checked for all my group types. I didn't need it at all, but had it checked just in case I sometime in the future decide to add fields to the relationships. So currently, I managed to get it working just by unchecking "Group creator must complete their membership", as I don't need it at all now. Obviously, for all my groups, I do have the option "The group creator automatically becomes a member" enabled (I think there might have been some confusion with those two options in last comments).

But ye, I got it working so no issue for me anymore. But if having the option "Group creator must complete their membership" checked should not interfere with creating the subgroup memberships, there might be something wrong. Though, I experienced this exact behaviour with Subgroup (subgroup) module too, tested that too yesterday and it behaves exactly same way than this module when it comes to auto-creating those subgroup memberships.

🇫🇮Finland phonkala

I figured this out finally. If you have "Group creator must complete their membership" checked in the subgroup group type, the membership is not created automatically. I turned that off, and now the membership is created correctly when new subgroup is created.

🇫🇮Finland phonkala

Hey!

No that's the first thing I checked. Actually I got all the checkboxes checked, when creating/managing a group type, for all of my group types.

Did you create the subgroup directly from the Group UI or as a subgroup of existing parent group via the group operations? If I create the subgroup just via the Group UI directly (then it has no parent group), the membership is created. But if I open a Parent group first and then create a Child group via group operations, the membership is never created. Just checked this with my original project and with the fresh Drupal 10 install, both act the same way.

🇫🇮Finland phonkala

Hey there @LOBsTerr!

Have you had any time to check this out? I did a clean Drupal 10 install with just Group, this module (ggroup) and Views enabled and I'm experiencing same issue there, when creating subgroup the default membership just isn't created. I tested same with the Subgroup module (subgroup) too (the one I used earlier) and same issue there too, with clean install.

Could there be some limitation with the actual Group module that causes this? Just feels like something is missing, or maybe it's just me :) I tried enabling absolutely every permission in Parent and Child groups, and in admin > people > permissions, and still it's not creating the subgroup default membership. AND even enabled all the possible content plugins for both groups, but nothing changed.

🇫🇮Finland phonkala

Hey @yurg!

In your use case, I don't think you are using paths at all. Actually, you propably don't even have path aliases on those, based on your example having those IDs in the URL. I mean, aren't the store/1, user/1 and node/1 just default routes with entity id at the end? I think you could just use the basic entity ID (or user ID etc) as the contextual filter and it would work.

For my use case, let's say I got content types "Activity Tracker" and "Activity". I add new "Activity Tracker" called "Fitness Log". For my "Activity Tracker" content type, I set the pathauto pattern to be "/activity-trackers/[node:title]", instead of "/activity-trackers/[node:nid]".

So basicly, I wanted to list all the "Activities" added to that "Fitness Log" activity tracker in "/activity-trackers/fitness-log/activities", instead of the basic "/activity-trackers/1/activities". For this I needed a way to get the entity id from path alias, as the ID wasn't in the URL.

For your use case, I think you would need this module if you want your stores have the name of the store in the URL, for example "/store/my-store" (store ID 1). Then, you could make a View page with path "/store/%/products" and if you used the contextual filter to be converted from path alias, you could access the products via "/store/my-store/products" instead of "/store/1/products".

🇫🇮Finland phonkala

Couldn't apply MR!8 diff myself on 2.0.x-dev. The MR does say it's for 8.x-1.x though, I guess that's the issue then, even though this issue is for 2.0.x-dev.

🇫🇮Finland phonkala

Had same issue and yes I can confirm too, this is duplicate of the linked issue. Though this has way more understandable title, this is the one that came up with Google search. The patch #213 in the linked issue fixed the problem for me.

🇫🇮Finland phonkala

Thanks, this seems to work nicely. All the anchor URLs look very clear and pretty now.

I also realized that certain characters that should just be removed from the urls (like apostrophe, quotation mark etc) are currently turned into hyphens. So I was thinking: Would it be possible to just use the Drupal cores transliteration interface to achieve this (Drupal\Component\Transliteration)? This is of course just an idea, but I guess that would streamline the module with Drupals behavior even more.

Anyways, the current dev version works perfectly for my use, thanks for the latest update!

🇫🇮Finland phonkala

This comment might be completely unrelated, but I was just recently getting some LoadJS error when adding specifically Views blocks to my site. There was also lots other JS "undefined" errors whenever this happened. Also, this caused modules like Contextual Links & Layout Builder to stop working correctly and also there was something weird happening in the UI.

My issue ended up being a missing tag in one Views block, I was using custom formatting for the output. This for some reason caused so so many issues on the site, including the JS errors and for some weird reason, also my Olivero sidebar was placed inside those tags (even though the Views blocks were in main content area), causing issues with the site theme and breaking many UI related modules.

What I was thinking, maybe the "The requested URL's length exceeds the capacity limit for this server." you mentioned could be causing this too. If the server limits the request url length, you obviously aren't getting the response you expect, maybe that could cause similar issue I had.

You might wanna try removing the blocks one by one and see if it's some specific one that is causing the issue. But anyways, just wanted to add a comment in case this would help figuring out the issue even a bit.

🇫🇮Finland phonkala

Hey there!

There is nothing wrong with it technically, but I don't think it really should be there. I guess same would apply if hyphen was the first character in the url. Sure it works fine, but for readability/cleanliness in for example search results etc, it just feels very unnecessary.

For example, if there was a header:
"!!! Hey this works fine, don't you think???",

I don't think the url should be
"mydomain.com/article-1#-hey-this-works-fine-dont-you-think-", it should be
"mydomain.com/article-1#hey-this-works-fine-dont-you-think"

But I guess in the end it's just my opinion. Though I do truely think that when applying this kind of automation, the goal should be as simple and easy-to-read urls as possible, and those first/last character hyphens really have no reason to be in the URL, at least I can't think of a any :)

🇫🇮Finland phonkala

To be more precise, the dropdown is currently listing the Reports profile options as:

Website 1
  - Data Stream 1
  - Data Stream 2
Website 2
  - Data Stream 1

When it should probably show a list like this:

Organization A
  - Website 1
      - Data Stream 1
      - Data Stream 2
  - Website 2
      - Data Stream 1
Organization B
  - Website 1
      - Data Stream 1
      - Data Stream 2
  - Website 2
      - Data Stream 1
🇫🇮Finland phonkala

Sorry have never done a patch before so not sure if that merge request was to correct way, didn't see a way to add the patch file any other way. But found the option now, here's quick patch to remove the entity query access check error.

🇫🇮Finland phonkala

Ahh I think I figured it out. I was thinking the

{# --- Include svg sprite --- #}
<div style="display: none">{% include social_buttons_sprite %}</div>

is required in Twig to even use the icons, but I guess it's there just for preloading purposes?

I believe using include for that actually includes the contents of the file into the code and doesn't actually even preload the image file. Also, based on the link I added at the end of my last comment (#15), there might be permission issues using include to load svg files inside Twig.

I googled how svg files should be preloaded in html and found this: https://stackoverflow.com/questions/62377727/how-to-preload-an-svg-image...

So based on that, I chanced the

{# --- Include svg sprite --- #}
<div style="display: none">{% include social_buttons_sprite %}</div>

into

{# --- Include svg sprite --- #}
<div style="display: none"><link rel="preload" href="{{ social_buttons_sprite }}" as="image" type="image/svg+xml" crossorigin="anonymous" /></div>

Now everything seems to work fine, no errors and icons do show up.

🇫🇮Finland phonkala

The FB sharer has https protocol, but if you keep looking forward the twig file, the very next sharer link (Twitter) is already using http. There are few links in twig template that could be "fixed".

Yes my website is using https. It's actually a .dev domain so can't even use plain http :)

🇫🇮Finland phonkala

I just realized, using the stable version of the module, there is actual content in the first div of the twig file:

{# --- Include svg sprite --- #}
<div style="display: none">{% include social_buttons_sprite %}</div>

When I'm checking it via Chrome dev console or just source code, inside the div, with stable version, there is the svg html tag and all it's inner content (defs, symbols, paths etc.).

When using the dev version with the "ignore missing" added to twig file include (to bypass the error I keep getting), that div is completely empty for me (<div style="display: none"></div>). So the "ignore missing" is clearly filling it's purpose, I guess the svg file just is not found for whatever reason in twig template and twig is ignoring it. However, the icons do work perfectly, even after clearing Drupal/browser cache.

🇫🇮Finland phonkala

Hey @shelane!

My site is running in subdir in my dev environment, that is what I was trying indicate with the "/a/b/c" folder/url structure. The share buttons are in a block, in the Social Bar region of Olivero. Running Drupal 10.1.1.

I just did a fresh install of Drupal to subfolder "mydomain.dev/a/b/c/web/" to test this, with just Better Social Sharing Buttons installed. If I install the stable version of this module and place the share buttons into a block, the url path of the svg file points to "mydomain.dev/modules/contrib/better_social_sharing_buttons/assets/dist/sprites/social-icons--square.svg" so it is missing the subfolders and the icons won't show up. When I install the dev version, I once again get the same error I mentioned before. Here is the stack trace of it:

Twig\Environment->getTemplateClass() (Line: 204)
Drupal\Core\Template\TwigEnvironment->getTemplateClass() (Line: 319)
Twig\Template->loadTemplate() (Line: 45)
__TwigTemplate_95a24dd74af07297fa12b28b9477ba05->doDisplay() (Line: 394)
Twig\Template->displayWithErrorHandling() (Line: 367)
Twig\Template->display() (Line: 379)
Twig\Template->render() (Line: 40)
Twig\TemplateWrapper->render() (Line: 53)
twig_render_template() (Line: 372)
Drupal\Core\Theme\ThemeManager->render() (Line: 436)
Drupal\Core\Render\Renderer->doRender() (Line: 204)
Drupal\Core\Render\Renderer->render() (Line: 474)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 90)
__TwigTemplate_d1731b982d08fea58c1650bd7940916b->block_content() (Line: 171)
Twig\Template->displayBlock() (Line: 74)
__TwigTemplate_d1731b982d08fea58c1650bd7940916b->doDisplay() (Line: 394)
Twig\Template->displayWithErrorHandling() (Line: 367)
Twig\Template->display() (Line: 379)
Twig\Template->render() (Line: 40)
Twig\TemplateWrapper->render() (Line: 53)
twig_render_template() (Line: 372)
Drupal\Core\Theme\ThemeManager->render() (Line: 436)
Drupal\Core\Render\Renderer->doRender() (Line: 449)
Drupal\Core\Render\Renderer->doRender() (Line: 204)
Drupal\Core\Render\Renderer->render() (Line: 474)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 176)
__TwigTemplate_421e2c49b82c005693398eac1d302f3e->doDisplay() (Line: 394)
Twig\Template->displayWithErrorHandling() (Line: 367)
Twig\Template->display() (Line: 379)
Twig\Template->render() (Line: 40)
Twig\TemplateWrapper->render() (Line: 53)
twig_render_template() (Line: 372)
Drupal\Core\Theme\ThemeManager->render() (Line: 436)
Drupal\Core\Render\Renderer->doRender() (Line: 204)
Drupal\Core\Render\Renderer->render() (Line: 474)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 93)
__TwigTemplate_70a02092721b37e59a3f82beed4828fe->doDisplay() (Line: 394)
Twig\Template->displayWithErrorHandling() (Line: 367)
Twig\Template->display() (Line: 379)
Twig\Template->render() (Line: 40)
Twig\TemplateWrapper->render() (Line: 53)
twig_render_template() (Line: 372)
Drupal\Core\Theme\ThemeManager->render() (Line: 436)
Drupal\Core\Render\Renderer->doRender() (Line: 204)
Drupal\Core\Render\Renderer->render() (Line: 158)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 583)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 159)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
call_user_func() (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 171)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 74)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)

And if I then just add the "ignore missing" to the include in the module twig template file:

{# --- Include svg sprite --- #}
<div style="display: none">{% include social_buttons_sprite ignore missing %}</div>

everything starts to work correctly, svg url has the correct subfolder structure.

Also tested with Claro theme in Drupal 10, same issue.

🇫🇮Finland phonkala

With the #9 patch and after installing 4.x-dev, I've been getting this error:

The website encountered an unexpected error. Please try again later.

Twig\Error\LoaderError: Template "/a/b/c/modules/contrib/better_social_sharing_buttons/assets/dist/sprites/social-icons--square.svg" is not defined in "modules/contrib/better_social_sharing_buttons/templates/better-social-sharing-buttons.html.twig" at line 4. in Twig\Loader\ChainLoader->getCacheKey() (line 99 of /home/myhome/domains/mydomain.com/public_html/a/b/c/vendor/twig/twig/src/Loader/ChainLoader.php).

After some testing, the issue I am having is that whenever I have actual whole URL with domain and/or protocol (or the one that is written in the module) in the module file function better_social_sharing_buttons_preprocess_better_social_sharing_buttons(), line where you set the $variables['social_buttons_sprite'], I keep getting this error. Well, even if I remove the function Url::fromUri() completely from that line and just use a static string with correct subfolder path like "/a/b/c/path-here", I get same error. If I use just "/path-here", no error but the icons also won't load as the path is missing the subfolders. Manually adding protocol/domain to the url string also generates the error. If I set the actual subfolder path inside Twig template instead of the variable in module file, everything works fine.

Based on this fix from related issue from another module ( https://www.drupal.org/files/issues/2022-09-28/3312270-claro-menu-twig-f... ), I added ignore missing at the end of the include in Twig file, and everything works again, icons do load nicely and no errors. Feels a bit weird to me, as the svg file does exist, can be opened in browser, Chrome devel console shows the correct path etc. But I just wanted to add this here, maybe there is still some part in the code that doesn't take every case into consideration.

🇫🇮Finland phonkala

Actually now I started thinking this might actually be core issue, as I see same behaviour after installing Groups module. Clicking any of the group action links sets the ?destination part in URL into ?destination=/a/b/c/<correct-path> too.

Maybe someone more familiar with Drupal could check/answer to this easily?

🇫🇮Finland phonkala

@bbombachini Ah now I see it, using "webform_checkboxes_other" as the element type sure does give the array key error! Weirdly, "webform_select_other" works just fine.

🇫🇮Finland phonkala

Oh yes sorry, of course I forgot to add Drupal version :) The one I'm using is 10.0.8. Testing on Windows 10, with Chrome/Firefox/Edge/Opera latest versions - only on Firefox it works fine, others add that extra pixel at the bottom of screen and show scrollbars.

Like @o_tymoshchuk said, to fix it you can use negative margin body.gin-login .user-form-page { margin-bottom: -1px; } (negative margin-top removes scrollbar too, but then it moves the wallpaper up and leaves one blank pixel below it).

🇫🇮Finland phonkala

@bbombachini I was getting no output of that yaml (well, there was submit button) so checked into it a bit and seems the element types are named differently than mine. Modified the source "elements" section a bit, with this I got composite with checkboxes:

elements:
  custom_composite_test:
    '#type': custom_composite
    '#title': 'Custom composite test'
    '#element':
      select_options:
        '#type': checkboxes
        '#options':
          test1: 'Test 1'
          test2: 'Test 2'
          test3: 'Test 3'
          test4: 'Test 4'
        '#title': 'Select options'

And submitting gives no error.

Basically I just checked the element types from my other forms and replaced the ones you had with them. And also removed the "|-" part from the "elements" row.

🇫🇮Finland phonkala

For me the parth #48 works fine right after applying it, using Drupal 10.0.8, Webforms 6.2.0-beta5 and PHP 8.1. This feature was very much needed and as it's just saving the data as JSON string, I don't think adding this to the actual module would be much of an issue. However if that is not desired, maybe this could be moved to a separate module while it's not considered stable?

And for @bbombachini, I had no issue using checkboxes and submitting form, no errors there.

Production build 0.71.5 2024