Merge Requests

More

Recent comments

🇩🇪Germany Antonín Slejška Hannover

The following commit solves the issue described in the comment #8:
https://git.drupalcode.org/project/ai_provider_azure/-/commit/052496c055...

When I install "drupal/ai_provider_azure:1.0.x-dev@dev", then the provider works for me. It would be nice to create a new tag.

🇩🇪Germany Antonín Slejška Hannover

I experience the same problem with "Azure - OpenAI GPT-4o Mini" model. (It does work with the Gemini provider.)

The problem is, that the method isUsable in the plugin AzureProvider returns FALSE. It returns FALSE, because $operation_type is NULL. The variable is null because it is called without parameters, see: https://git.drupalcode.org/project/ai/-/blob/1.0.5/src/AiProviderPluginM...

🇩🇪Germany Antonín Slejška Hannover

The 1.1.3 should work correctly.

It is necessary to run the drush deploy:hook or drush deploy command!

🇩🇪Germany Antonín Slejška Hannover

Maybe, I can create a new version 1.1.2 where the new dependency is installed.
And then I create the version 1.1.3 where the Key module is used.

🇩🇪Germany Antonín Slejška Hannover

The hook is executed by drush deploy:hook command.

The problem in the ip_info.deploy.php is, that there is the use statement
use Drupal\key\Entity\Key;
But the module is at the moment not installed.

It is the first time, that I add a new dependency in a contrib module. It looks like I have to just add the dependency without using it and in the following version of the module to add the code using the dependency. I have no idea, how I can solve the problem now.

🇩🇪Germany Antonín Slejška Hannover

The deploy hook https://git.drupalcode.org/project/ip_info/-/blob/1.x/ip_info.deploy.php goes through all ip_info keys/tokens in the config ip_info.settings or in the settings.php and creates new keys in the Key module. They relations to the keys are then usedin the ip_info.settings config instead of the keys.

I suppose I have to add the install hook also to the ip_info.deploy.php file. The Key module is installed in the post_update hook. But in the drush deploy command (https://www.drush.org/13.x/deploycommand/) runs config-import after it. This deactivates the Key module. It should be activated in the deploy hook.

🇩🇪Germany Antonín Slejška Hannover

Hi Jürgen,
thanks for the analysis. There is a deploy hook, which should update the ip_info.settings. But I forget to add the update hook, which should enable the Key module.

🇩🇪Germany Antonín Slejška Hannover

I will create the "1.0.x" branch for the D10/D11 version of the module. Is it okay for you?

🇩🇪Germany Antonín Slejška Hannover

I have sent Bálint a message using the contact form .

🇩🇪Germany Antonín Slejška Hannover

I have reviewed the MR, tested the functionality and integrated the new service to the module ip_info . Thanks for the code and the idea.

🇩🇪Germany Antonín Slejška Hannover

There is also another way how to create a service with an optional dependency:
https://eiriksm.dev/services-with-optional-dependencies-drupal-8
I think this is a promising approach.

🇩🇪Germany Antonín Slejška Hannover

There is just one last problem in the phpstan test:

Parameter $crowdsecCti of method Drupal\ip_info\Services\CtiFactory::__construct() has invalid type Drupal\crowdsec\Cti.

See: https://git.drupalcode.org/project/ip_info/-/jobs/4436363

🇩🇪Germany Antonín Slejška Hannover

The following factory service works:

<?php
namespace Drupal\ip_info\Services;
class CtiFactory {
  public function getCtiService() {
    if (\Drupal::hasService('crowdsec.cti')) {
      return \Drupal::service('crowdsec.cti');
    }
    return new FakeCti();
  }
}

But when I try to implement the dependency injection, I have the same problems.

🇩🇪Germany Antonín Slejška Hannover

I have tried to implement it: https://git.drupalcode.org/project/ip_info/-/merge_requests/3/diffs
If the module crowdsec is deactivated, it works (nothing is displayed). If the module is enabled, I get the following error message:

TypeError: Drupal\ip_info\Services\CrowdSec::__construct(): Argument #1 ($cti) must be of type Drupal\ip_info\Services\FakeCti, Drupal\crowdsec\Cti given, called in /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 in Drupal\ip_info\Services\CrowdSec->__construct() (line 26 of modules/contrib/ip_info/src/Services/CrowdSec.php).

🇩🇪Germany Antonín Slejška Hannover

I Integrated the Crowdsec CTI service, but I have not found a way how to inject a service, which possibly does not exist. The following code does work, but it does not apply the Drupal Coding Standards: commit/bcb9fad356f64...

I have tried to decorate the CTI service and make the original service optional. But it did not work.

🇩🇪Germany Antonín Slejška Hannover

I have the same problem (Drupal 10.4.2, module version 8.x-1.21). The patch solves the problem in Claro but not in Gin Admin Theme.

🇩🇪Germany Antonín Slejška Hannover

I am pleased, if the module can help you. I use the module to identify spammers. We had a lot of log messages from the module Honeypot ...

🇩🇪Germany Antonín Slejška Hannover

Hi Dan,
go to Drupal Log (/admin/reports/dblog), click on some log message (/admin/reports/dblog/event/?????), click on the link beside the label "hostname" (/admin/reports/ip/??.??.???.???) . Then you should see something like:

🇩🇪Germany Antonín Slejška Hannover

The patch avoid_global_cache_clear_for_node_urls-3256211-4.patch is incompatible with 1.7.0. I have rebuilt the patch using the merge request. You can get the patch as .patch or .diff.

🇩🇪Germany Antonín Slejška Hannover

antonín slejška made their first commit to this issue’s fork.

🇩🇪Germany Antonín Slejška Hannover

I have the same problem in Gin. The MR looks good for me, and it works (in Gin).

🇩🇪Germany Antonín Slejška Hannover

The patch issue-3202896-7.patch and the diff drupal-3202896-MR9357-11.x--20240828-1.diff look good for me.

🇩🇪Germany Antonín Slejška Hannover

The following change solves the problem on our sites: https://git.drupalcode.org/issue/menu_block-3465931/-/commit/9248fe00ca0...

I have not done any tests to see what the effects of this change are. But I hope it helps to localize and understand the problem.

🇩🇪Germany Antonín Slejška Hannover

We use the patch on multiple sites (in production). It works as expected.

🇩🇪Germany Antonín Slejška Hannover

I have tested the changes locally. It works for me.

🇩🇪Germany Antonín Slejška Hannover

I have:

  1. added the template page--user--general (it is used in: https://www.drupal.org/project/email_tfa/issues/3247198 📌 Integration with gin_login module Needs review ),
  2. reviewed the code (it looks good to me),
  3. tested it on our websites (it works).
🇩🇪Germany Antonín Slejška Hannover

I have updated the merge request to be compatible with email_tfa 2.0.

🇩🇪Germany Antonín Slejška Hannover

I have added the methods setSitemaps and getSitemaps to the GeneratorInterface. It works: https://git.drupalcode.org/issue/simple_sitemap-3432628/-/pipelines/126371
But I'm not sure, if it is the best solution. Why not to use 'extend'?

🇩🇪Germany Antonín Slejška Hannover

Hi @gbyte, I have implemented it, as you suggested. It works by me locally, but it causes the following issues:
https://git.drupalcode.org/issue/simple_sitemap-3432628/-/jobs/1132670

🇩🇪Germany Antonín Slejška Hannover

To delete all private or shared tempstores is recently not possible. See:

🇩🇪Germany Antonín Slejška Hannover

Thanks, @clarkssquared, for the review!

🇩🇪Germany Antonín Slejška Hannover

I get the following error message after composer update:
Cannot apply patch #3150540 Config in en (patches/core/3150540-30.patch)!

I have started a new test for 3150540-30.patch. The test failed: https://www.drupal.org/pift-ci-job/2657165

Production build 0.71.5 2024