Account created on 8 October 2009, over 14 years ago
#

Merge Requests

Recent comments

🇪🇸Spain cbccharlie

Hola!

@jbellido era una idea sin más, que podía plantearse a modo charla de alguien o a modo conversación, pero ya se ha ofrecido @ygoex :) a preparar una charla, así que genial!

En todo caso, al margen de lo que prepare @ygoex, se podrían reservar unos minutos al final de su charla para contrastar formas de trabajar de los diferentes asistentes (los que quieran participar) y discutir temas como los que indicaba en la propuesta.

🇪🇸Spain cbccharlie

Although the issue is from version 8.x, I also upload a patch for version 7.x-2.x.

🇪🇸Spain cbccharlie

Yes, this module is very small.
@apaderno, I am also the maintainer of the Drupal 10 version of the module https://www.drupal.org/project/title_length .
Thank you!

🇪🇸Spain cbccharlie

+1 to what @anybody comments, I think it would be a good idea.

🇪🇸Spain cbccharlie

Hi,

While the new VUE-based JS library is not available, we have implemented a small JS script that renders any HTML that is embedded in the banner. It is a completely provisional solution, but it can help those of us who have this need get through it. I'm only contributing it in case someone finds it useful, but it's still minimally tested.

(function (Drupal, once) {

  'use strict';

  Drupal.behaviors.myCustomCookies = {
    attach(context, settings) {
      once('myCustomCookies', 'body', context).forEach(function (element) {
        const observer = new MutationObserver((mutations, obs) => {
          const cookiesBannerText = document.getElementsByClassName('cookiesjsr-banner--text');
          if (cookiesBannerText[0]) {
            const parser = new DOMParser();
            const textarea = document.createElement('textarea');
            textarea.innerHTML = cookiesBannerText[0].innerHTML;
            const cookiesBannerHTML = parser.parseFromString(textarea.value, 'text/html');
            cookiesBannerText[0].innerHTML = cookiesBannerHTML.firstChild.innerHTML;
            obs.disconnect();
          }
        });
        observer.observe(document.body, { attributes: true, childList: true, subtree: true });
      });
    },
  };

}(Drupal, once));

In addition to this, it would be necessary to define the library and load it with the component.

Thanks!

🇪🇸Spain cbccharlie

Thank you for the quick correction and sorry for the problems caused. I forgot about the third party integrations. :(

🇪🇸Spain cbccharlie

Thanks @anybody, rebase done. Change to "needs review" for whoever can review it.

🇪🇸Spain cbccharlie

cbccharlie changed the visibility of the branch 3422880-convert-cookiesknockoutservice-in-service to hidden.

🇪🇸Spain cbccharlie

In case this helps someone with the same need, here's what we have done:

In our case, we wanted the block to always be placed, both in the public and private parts, without having to do it through Drupal block management. To achieve this, we have:

  1. Loaded it into our module using the hook_page_top and always at the beginning for accessibility.
  2. $cookies_ui_block = Drupal::service('plugin.manager.block')->createInstance('cookies_ui_block');
    if ($cookies_ui_block instanceof BlockPluginInterface) {
      $block['cookies_ui_block'] = $cookies_ui_block->build();
      $page_top = $block + $page_top;
    }
    
  3. By doing this, we didn't get the cookie blocked message in each component due to the logic of the CookiesKnockOutService class, which checks if the block is placed. Since we always want it to be placed, we need to alter this logic. To do this, we have converted that class to a service in a merge request (MR) from another issue on Drupal.org ( https://www.drupal.org/project/cookies/issues/3422880 Convert CookiesKnockOutService in service Needs review ), and in our module, using a ServiceProvider, we alter the service so that the doKnockOut method always returns true.
🇪🇸Spain cbccharlie

Hi,

We have also been receiving a lot of spam for a few days now using recaptcha v2 and honeypot.

There must be some problem, whether in the module or another issue.

Thanks!

🇪🇸Spain cbccharlie

Hi @kopeboy. This module was designed to be used in custom developments using render arrays. You have examples in the module readme.

🇪🇸Spain cbccharlie

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

🇪🇸Spain cbccharlie

Hello Viktor,

I cannot make you a co-maintainer because I am not the owner of the module. In any case, I have solved the issue that I had opened and published a stable version for Drupal 10.

If you want to contribute to the module, even if you are not a co-maintainer, you can create issues with their corresponding MR (this way the corresponding attribution will be automatically generated) and I will be in charge of reviewing it and generating new versions.

Thank you so much.
All the best.

🇪🇸Spain cbccharlie

Thanks @qzmenko. I just integrated your changes and generated a stable version 2.0.0.

🇪🇸Spain cbccharlie

Although the issue is from version 8.x, I also upload a patch for version 2.0.2.

🇪🇸Spain cbccharlie

Hi,

Current patches are not working with entities without translations (langcode column missing).

Column not found: 1054 Unknown column 'ENTITY.langcode' in 'on clause'.

🇪🇸Spain cbccharlie

Hello,

Although the problem exists in the CORE, I think it is also important to provide a solution from the module for whoever is using it.
I have created a fork to correct this problem on the development branch and I also upload 2 patches, one for whoever is using version 1.2 and another for whoever is using version 1.3.

Thank you!
Greetings.

🇪🇸Spain cbccharlie

Hello,

The current patch causes the title to be displayed even though the view has no results.

Wouldn't it be enough to return the cache tags when the view has no results instead of rendering it anyway?

I upload a new patch doing it this way.

Thanks!

Production build 0.69.0 2024