🇺🇦Ukraine @Anna D

Account created on 11 July 2019, almost 6 years ago
#

Recent comments

🇺🇦Ukraine Anna D

I got the following error:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: Service "queue.rabbitmq.default" not found: the container inside "Drupal\Core\Queue\QueueFactory" is a smaller service locator that only knows about the "queue.database", "queue.rabbitmq", "queue.redis_reliable", and "queue.redis" services. in Symfony\Component\DependencyInjection\ServiceLocator->createNotFoundException() (line 137 of /var/www/html/vendor/symfony/dependency-injection/ServiceLocator.php).

The problem was solved by changing:
(I'm not sure why the previous name doesn't work, might be another bug)

$settings['queue_service_my_queue'] = 'queue.rabbitmq.default';

to:

$settings['queue_service_my_queue'] = 'queue.rabbitmq';

And by adding an implementation of QueueFactoryInterface for the QueueFactory class.

This was due to: https://www.drupal.org/node/3417034
A similar issue: https://www.drupal.org/project/sm/issues/3472735 Queue factories must implement QueueFactoryInterface Fixed

🇺🇦Ukraine Anna D

#248 should be rerolled for Drupal 11:

Fatal error: Declaration of Drupal\image\Plugin\DataType\ComputedImageStyleDerivatives::getIterator() must be compatible with Drupal\Core\TypedData\Plugin\DataType\Map::getIterator(): ArrayIterator in /var/www/html/web/core/modules/image/src/Plugin/DataType/ComputedImageStyleDerivatives.php on line 170

🇺🇦Ukraine Anna D

Hi module maintainers,
Do you have any plans to release a Drupal 11-compatible version? Thank you!

🇺🇦Ukraine Anna D

Rerolled patch #4 to be applicable to 3.0.x. Also renamed data type from location_algolia to geolocation_algolia.

Phpstan returns
Line src/Plugin/search_api/data_type/GeolocationAlgoliaDataType.php
------ ----------------------------------------------------------------------------------
17 Class
Drupal\search_api_algolia\Plugin\search_api\data_type\GeolocationAlgoliaDataType
extends unknown class Drupal\search_api\DataType\DataTypePluginBase.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols

That might be fixed with adding drupal/search_api to the composer.json.

🇺🇦Ukraine Anna D

Hello Jessica Denkelaar,

Thank you for providing the screen recording.

Language-Country negotiation does not work on admin pages. I suggest enabling and configuring "URL (Path prefix)" and placing it after Language-Country negotiation so that LCN has higher priority. If the problem persists, try disabling "Account Administration Language" to see if the issue still occurs.

Please keep us posted.

🇺🇦Ukraine Anna D

Ups.. sorry fixed issue was about Drupal 10 compatibility.

🇺🇦Ukraine Anna D

Hello @bhaveshdas
Drupal 11 compatibility was fixed in https://www.drupal.org/project/pate/issues/3304097 📌 Automated Drupal 10 compatibility fixes Fixed .

Will be good to get a new release of the module.

🇺🇦Ukraine Anna D

Hello @marcoscano,
Is there a plan to release a Drupal 11 version of this module? Thank you!

🇺🇦Ukraine Anna D

Hi David,
Is there a plan to release a Drupal 11 version of this module? Thank you!

🇺🇦Ukraine Anna D

I'll update the priority. Hope this finds you well. No pressure, but it would be great to have an update on it.

🇺🇦Ukraine Anna D

Yes, and this is not clear to me.

$submitted_configurable = $node->getFieldDefinition('created')->isDisplayConfigurable('view') || $node->getFieldDefinition('uid')->isDisplayConfigurable('view');

The Created On (date) and Created By (uid) fields are not configured to be displayed. However, I need to display them in order to avoid adding a related author cache tag. Is that correct?

🇺🇦Ukraine Anna D

A little more work is needed:

1. With the current setup, absolute paths (e.g., 'https://example...') are incorrectly processed in the getPrefixFromPath() and removePrefixFromPath() methods.
2. The use of strtolower($prefix) in getPrefixFromPath() reduces flexibility for prefixes like en-GB (at least for custom prefixes, since auto-replaced country codes are always forced to lowercase).
3. removePrefixFromPath() should reuse getPrefixFromPath(), but it won’t work as expected if the prefix contains uppercase letters.

I wouldn't touch lowercase in this issue; we need to think a little more about it. (maybe allow to use case in the pattern? COUNTRY_CODE vs county_code)

🇺🇦Ukraine Anna D

Also I got a next problem that was fixed with adding "file" to the $modules:

"Symfony\Component\DependencyInjection\Exception\RuntimeException: Cannot autowire service "openid_connect.openid_connect": argument "$fileRepository" of method "Drupal\openid_connect\OpenIDConnect::__construct()" references interface "Drupal\file\FileRepositoryInterface" but no such service exists. Did you create a class that implements this interface?"

🇺🇦Ukraine Anna D

Any ideas on continuing work on this issue?

I found that a user:id (node author) cache tag is added to every node. However, the author display is disabled, and a small investigation led me to template_preprocess_node().

By default this function performs special preprocessing of some base fields so they are available as variables in the template. For example 'title' appears as 'label'. This preprocessing is skipped if:
a module makes the field's display configurable via the field UI by means of BaseFieldDefinition::setDisplayConfigurable() AND the additional entity type property 'enable_base_field_custom_preprocess_skipping' has been set using hook_entity_type_build().

This is unclear to me because $submitted_configurable is FALSE in my case (the date and UID fields are not displayed in the view display). As a result, the condition if (!$skip_custom_preprocessing || !$submitted_configurable) is always TRUE.

Additionally, I would separate the date and UID in this case. If only the date is needed, the author (and consequently, the user cache tags) is still added.

🇺🇦Ukraine Anna D

@anna d, you mentioned custom kernel tests failing. Are you extending the `@openid_connect.openid_connect` service anywhere and/or injecting it in a custom class?

We have kernel tests for a custom module that depends on the OpenID Connect module, specifically the openid_connect.claims service. The openid_connect.openid_connect service is not used directly.

After adding 'externalauth' to the $modules the problem was solved.

🇺🇦Ukraine Anna D

After updating openid_connect from 3.0.0-alpha5 to 3.0.0-alpha6, the following error occurred in custom kernel tests with openid_connect in $modules:
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service openid_connect.openid_connect.

Similar to issue #5, this is resolved by removing Drupal\openid_connect\OpenIDConnect: '@openid_connect.openid_connect' from openid_connect.services.yml.

The script openid_connect_rebuild_container_3462532 ran without errors, but the problem persists.

🇺🇦Ukraine Anna D

Partially agree.

I'd be more strict with country-language negotiation. Usually, if the prefix is wrong, it leads to a 404 error. What we do with partial matching and fallback is more experimental, and we try to guess the country-language pair.

🇺🇦Ukraine Anna D

The fallback mechanism has been fixed. However, the redirect to the international page has been removed when a country is not allowed, because it is unclear whether the issue is a wrong prefix or just a path (e.g., ./foo-boo/test).

Notes:
Partial matching should not be applied in the getCountryCodeFromPath or getLangcodeFromPath methods as it was done before. If partial matching is used, it would be difficult to determine if the language-country combination is valid. This could lead to an additional check that we would like to avoid.

I am leaning toward having a single method to retrieve both the $langcode and $country_code from the countryRepository prefixes, as they are interdependent. Both should either be valid or both should be NULL.

Partial matching should be implemented as a separate method that would be used exclusively for fallback purposes and for detecting the current country.

🇺🇦Ukraine Anna D

I'll take the liberty of closing the issue as the module is compatible with Drupal 8.

🇺🇦Ukraine Anna D

Will close the issue as it is already RTBC in https://www.drupal.org/project/domain_entity/issues/3405907 🐛 Make module compatible with PHP 8.2 RTBC

Thank you!

🇺🇦Ukraine Anna D

D11 compatibility already in progress in https://www.drupal.org/project/domain_entity/issues/3429914 📌 Automated Drupal 11 compatibility fixes for domain_entity Needs review

🇺🇦Ukraine Anna D

Thank you, @interactivex, for reporting this issue.

I have investigated the problem, and it seems that you have enabled the fallback mechanism under Configuration > Region and Language > Languages > Language-Country Fallbacks. This setting allows pages to be displayed with a fallback translation.

For example:

  • Suppose Canada is set up with English and French as available languages.
  • Node A has only an English translation.
  • Accessing /en-ca/node-a will display the English translation with an English interface.
  • Accessing /fr-ca/node-a will display the fallback English translation with a French interface.

On the /fr-ca/node-a we will see the edit link (/fr/node/x/edit). Edit page displays the source translation with a French interface instead of allowing the creation of a new French translation. However, this is a Drupal behavior and not a bug in the module.

We can disable the module and check that:

/fr/node/x/edit displaying the French translation if it exists.
/fr/node/x/edit displaying the source translation if the French translation does not exist.

Please let me know if you need further clarification.

🇺🇦Ukraine Anna D

Cannot reproduce the access problem on the 2.0.0-rc5 module version.

🇺🇦Ukraine Anna D

Added also
- INTERNATIONAL_PRIORITY_FREIGHT
- INTERNATIONAL_ECONOMY_FREIGHT
- FEDEX_INTERNATIONAL_DEFERRED_FREIGHT

Ideally, all services should be listed.

🇺🇦Ukraine Anna D

anna d made their first commit to this issue’s fork.

🇺🇦Ukraine Anna D

Not sure if this problem is related to mine.
I got alert in the FedEx API response: "The destination state/province code has been changed. "
Adding state_or_province to the recipient and shipper addresses in RateRequestEventSubscriber solved a problem.

🇺🇦Ukraine Anna D

1. We should ensure that $value is not empty and string as it is required by strpos() and explode().

  // Ensure the value is a non-empty string.
  if (empty($value) || !is_string($value)) {
    throw new \InvalidArgumentException('The provided value must be a non-empty string.');
  }

2. Variable $lat_lon_split in empty() always exists and is not falsy. (PHPStan error)

if (!empty($lat_lon_split) && isset($lat_lon_split[0]) && isset($lat_lon_split[1]))

could be simplified with:

if (count($lat_lon_split) === 2) 

3. Uppercase for boolean: false -> FALSE
4. I'd change plugin id: geolocation_algolia to specify that this is Geo location.

🇺🇦Ukraine Anna D

Patch #4 was added to the project more than a year ago and has been working well ever since. Thank you for your work.

🇺🇦Ukraine Anna D

Tested and reviewed the fix. Looks good for me.

🇺🇦Ukraine Anna D

Duplicated issue https://www.drupal.org/project/layoutcomponents/issues/3191648 🐛 Update "Reorder section" patch Active

🇺🇦Ukraine Anna D

Duplicated https://www.drupal.org/project/layoutcomponents/issues/3447638 🐛 Cannot apply patch Reorder sections in D10 Active
This issue is older, but with less activity. I'd close it.

🇺🇦Ukraine Anna D

Hello @tim-diels,

I didn't saw that the 1.0.x-dev version was targeted instead of 1.2.x-dev. I created a separate issue for GitLab CI/CD for 1.2.x-dev, and there are only two PHPStan errors:

Line src/Plugin/views/display/ViewsBlockOverride.php
------ ----------------------------------------------------------------------
181 \Drupal calls should be avoided in classes, use dependency injection
instead
198 \Drupal calls should be avoided in classes, use dependency injection
instead
------ ----------------------------------------------------------------------
[ERROR] Found 2 errors

I've created a separate issue specifically to address the dependency injection in the class. I'm not sure if you'd prefer to fix everything separately for 1.0.x-dev or just close this issue.

🇺🇦Ukraine Anna D

Thank you @avpaderno,

1. Fixed the use of translatable strings in logger methods.
2. $result['message'] now returns a translatable string for both successful and failed cases.
3. Used \Drupal\Core\Utility\Error::logException() to log exceptions.
4. Removed placeholder for link in src/Form/BingCredentialsForm.php.
I reviewed the example for using links on the page https://www.drupal.org/docs/7/api/localization-api/dynamic-or-static-lin... .

I was close to using the following approach:

$this->t('Follow <a href="@instruction_link">the instruction</a> to configure Bing and get API key.', [
        '@instruction_link' => 'https://learn.microsoft.com/en-us/bingwebmaster/getting-access#using-api-key',
      ]),

This would help avoid losing translation for the string in case the instruction link changes. However, I decided not to use a placeholder in case a different language for the link is needed (currently it is en-us).

Merged changes to 1.0.x branch

🇺🇦Ukraine Anna D

Thank you, @vishal.kadam, for the review.

The issues have been fixed in the 1.0.x branch.

🇺🇦Ukraine Anna D

Added .gitlab-ci for automated GitLab tests. Phpcs and phpstan pipelines still fails.

🇺🇦Ukraine Anna D

Added comments to the MR and honestly don't understand why I'm anonymous above.

🇺🇦Ukraine Anna D

It seems merged advanced options in https://www.drupal.org/project/group_content_menu/issues/3366930 Integrate some of Menu Block module's options Fixed do same thing:

Added 'follow_parent' attribute under this issue:

+    // If we're following the active trail and the active trail is deeper than
+    // the initial starting level, we update the level to match the active menu
+    // item's level in the menu.
+    if ($follow && count($parameters->activeTrail) > $level) {
+      $level = count($parameters->activeTrail);
+      $following = TRUE;
+    }
+
+    if ($following && count($parameters->activeTrail) >= $level) {
+      // Active trail array is child-first. Reverse it, and pull the new menu
+      // root based on the parent of the configured start level.
+      $menu_trail_ids = array_reverse(array_values($parameters->activeTrail));
+      $offset = ($follow_parent === 'active') ? 2 : 1;
+      $menu_root = $menu_trail_ids[$level - $offset];
+      $parameters->setRoot($menu_root)->setMinDepth(1);
+      if ($depth > 0) {
+        $parameters->setMaxDepth(min($depth, $this->menuTree->maxDepth()));
+      }
+    }

Added 'relative_visibility' attribute in #3366930 Integrate some of Menu Block module's options Fixed :

+    $relative_visibility = $this->configuration['relative_visibility'] ?? FALSE;
+    // If we're following the active trail and the active trail is deeper than
+    // the initial starting level, we update the level to match the active menu
+    // item's level in the menu.
+    if ($relative_visibility && \count($parameters->activeTrail) > $level) {
+      $level = \count($parameters->activeTrail);
+      $menu_trail_ids = \array_reverse(\array_values($parameters->activeTrail));
+      $menu_root = $menu_trail_ids[$level - 2];
+      $parameters->setRoot($menu_root);
+    }
+
     // When the depth is configured to zero, there is no depth limit. When depth
     // is non-zero, it indicates the number of levels that must be displayed.
     // Hence this is a relative depth that we must convert to an actual
     // (absolute) depth, that may never exceed the maximum depth.
     if ($depth > 0) {
-      $parameters->setMaxDepth(min($level + $depth - 1, $this->menuTree->maxDepth()));
+      $relative_depth = $relative_visibility ? $depth : $level + $depth - 1;
+      $parameters->setMaxDepth(\min($relative_depth, $this->menuTree->maxDepth()));
     }

This issue and #3366930 Integrate some of Menu Block module's options Fixed both concern providing additional attributes from 'MenuBlock.'
I'd vote to keep the same UI and avoid visual differences between editing Group Menus and Menus, but since it has already been merged, perhaps we can close this issue.
Thank you.

🇺🇦Ukraine Anna D

Tested applicable MR https://git.drupalcode.org/project/gin/-/merge_requests/237

Published checkbox isn't part of gin-sticky-form-actions.

🇺🇦Ukraine Anna D

Any possibilities to have separator+space?
To fix "Value1,Value2" with "Value1, Value2"

Unfortunately space is trimmed after saving form settings.

🇺🇦Ukraine Anna D

Added small fix to hook_access().

I have another issue. User cannot edit some menu link assigned to different domain, but still can create new menu link.

Production build 0.71.5 2024