πŸ‡©πŸ‡ͺGermany @Mortarion

Account created on 6 January 2020, over 4 years ago
#

Recent comments

πŸ‡©πŸ‡ͺGermany Mortarion

@gausarts, thank you for your suggestion. I will do it as recommended the next time.

At first I wanted to create an issue fork on drupalcode to create a respective merge request. That would have been easier, but I wasn't able to choose the correct namespace, so I stopped that attempt and instead used the patch that applies on my local machine.

πŸ‡©πŸ‡ͺGermany Mortarion

Thank you for the code. It didn't worked at the first try and I needed to make some adjustments. So I want to share the changed code with you. I placed inline comments as explanation.

    // Might not be available with self-closing [TAG data="BLAH" /].
    if (stristr($string, "[$item") !== FALSE) {
      $string = self::process($string, $item);

      // @todo remove into self::replace().
      // Replacing "<p><$item " alone is not enough, since the shortcodes can be empty. Replace them first
      $string = str_replace("<p><$item>", "<$item>", $string);
      $string = str_replace("<p><$item ", "<$item ", $string);
      $string = str_replace("<p><$item>\n", "<$item>", $string);
      // Replacing "</$item></p>\n"  would mean, that the line break is necessary, but it isn't? It would lead to orphaned tags not properly replaced
      $string = str_replace("</$item></p>", "</$item>", $string);
    }

    $text = self::process($string, $container);

    // @todo remove into self::replace().
    // Comments above apply here, too.
    $text = str_replace("<p><$container>", "<$container>", $text);
    $text = str_replace("<p><$container ", "<$container ", $text);
    $text = str_replace("<p><$container>\n", "<$container>\n", $text);
    $text = str_replace("</$container></p>", "</$container>", $text);
    return $text;

Free for discussion

πŸ‡©πŸ‡ͺGermany Mortarion

I can confirm, that spam still bypasses antibot at version 2.0.3

Unfortunately I can not add valuable information to that matter, since I am just facing the resulting spam.

πŸ‡©πŸ‡ͺGermany Mortarion

Thank you for your response. My Drupal version is 10.2.3

πŸ‡©πŸ‡ͺGermany Mortarion

That patch does not work, since I get the same errors when there are elements of .js-cookie-content-blocker

Since Drupal has deprecated core/jquery.once i think that this is the source of the problem. Using core/jquery.once.bc as an additional dependency of the cookie_content_blocker.libraries.yml fixes it for me, but just for now. So this is not the solution.

The whole cookieContentBlocker.js needs to be renewed to be compatible with Drupal 10. See the following links:

Production build 0.69.0 2024