🇨🇭Switzerland @megadesk3000

Account created on 4 November 2009, over 14 years ago
  • Senior Application Engineer at Unic 
#

Merge Requests

Recent comments

🇨🇭Switzerland megadesk3000

Hi togethter

I had the same error when creating a new media image via the backend ui on /media/add/image, after i installed filefield_paths module.
For me it was the case, that $file->filename was not present and therefore the same error came up.

I adjusted the patch slighty and now it works in my case.

Added a patch and an interdiff.

🇨🇭Switzerland megadesk3000

Hi
We were using the patch and recognized that the implode statement that has been inserted is in wrong parameter order and therefor the emergency logging will never happen.

FALSE
$headers = implode($headers, '<br>');

CORRECT:
$headers = implode('<br>', $headers);

Corrected patch added.

🇨🇭Switzerland megadesk3000

Found another missing access check in the original patch and fixed it.

🇨🇭Switzerland megadesk3000

We used the patch from #4 but the issue was back on D10.1.
I adjusted the regex with the changes i found in https://www.drupal.org/project/advagg/issues/3377084 🐛 css_defer_external option does not work if CSS URL contains characters not allowed by the regex Needs review and now the 403/404 page shows correct again.
Without the changes i get whitescreen since the "old" regex leads to a "Backtrack Limit Exhausted" error which leads en empty content variable afterwards which results in the whitescreen.

🇨🇭Switzerland megadesk3000

The patch in 33 has a problem together with drupal 10.1 since the line
$store_ids = \Drupal::entityTypeManager()->getStorage('commerce_store')->getQuery()->condition('uid', $account->id())->accessCheck()->execute();
is missing the mandatory access check.

I add a patch that fixes that.

🇨🇭Switzerland megadesk3000

Thanks neclimul!
I use
"3399951: Fix ajax_page_state leaks through request in Views Ajax": "https://git.drupalcode.org/project/drupal/-/commit/827b13b4bd8beaf77861b86b8ace48500ecdf6d1.patch"
in my composer patches section. That seems to resolve the issue for us.

Thanks again for the hint.

🇨🇭Switzerland megadesk3000

I experience the same issue in Drupal 10.1.6 using Facets 2.0.6 and the MR does not apply here.
Is there also a version of the Patch for Drupal 10 somewhere?

🇨🇭Switzerland megadesk3000

Since Drupal 8 support has been dropped the patch does not apply anymore to make the 2.2.x version d10 compatible.
I'll add a rerolled patch.

🇨🇭Switzerland megadesk3000

Hello
Almost 2 years later, while in the middle of a drupal 10 upgrade of an existing site, i need this patch on the 3.x branch and it does not apply.
So i rerolled it.

🇨🇭Switzerland megadesk3000

I experience the same issue after upgrading drupal/components to version 3.0.0-beta3 and i can confirm that the patch fixes the issue.

What i am not sure about is how the functionality implemented in \Drupal\graphql_twig\Template\Loader\Loader::findTemplate can work together with the new components definition syntax.

If one is using components and defined some namespaces in his thems info file like:

components:
  namespaces:
    src:
      - src
    base:
      - src/base

So after this, listComponents() will never be called in the findTemplate function, since $info['components'] will always be an array.
We are not using the "components" functionality from graphql_twig and i am not sure, what exactly it does.
For our case it fixes the issue, but if one has defined "components" in graphql_twig context in his themes info.yml then it will not work togethter with the new syntax from components.

🇨🇭Switzerland megadesk3000

We are using the patch from #5 which does not apply against latest 8.x-1.x branch.
I rerolled that patch and added more allowed rel attributes from https://www.w3schools.com/tags/att_a_rel.asp

Just for people that are already using an older version of this patch.

🇨🇭Switzerland megadesk3000

I added a patch, that does the following:

In EntityComparisonController::compare() a check has been added after the Entity has been loaded.

      // Go through entities.
      foreach ($entity_comparison_list[$entity_type][$bundle_type][$entity_comparison_id] as $entity_id) {
        // Get entity.
        $entity = $this->entityTypeManager->getStorage($entity_type)->load($entity_id);
        // First check if the entity still exists before accessing methods on it.
        if (!$entity) {
          // Remove the entity from the list, since it does not exist.
          $this->processRequest($entity_comparison, $entity_id);
          continue;
        }
        if ($entity->hasTranslation($this->languageManager->getCurrentLanguage()->getId())) {
          $entity = $entity->getTranslation($this->languageManager->getCurrentLanguage()->getId());
        }

If the entity does not exist, it gets removed from the entity comparison list as well automatically.

🇨🇭Switzerland megadesk3000

Don't know exactly if this is the same issue, but when i am trying to enable the symfony_mailer module in its 1.x-dev version i get the following error:

www-data@9da9a3bd1635:/app$ drush en symfony_mailer

In Container.php line 147:

  Circular reference detected for service "language_manager", path: "language_request_subscriber -> language_manager -> config.factory -> plugin.manager.email_builder -> entity_type.manager -> string_translation -> strin
  g_translator.locale.lookup".


PHP Fatal error:  Uncaught Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service "entity_type.manager", path: "user_last_access_subscriber -> entity_type.manager -> string_translation -> string_translator.locale.lookup -> config.factory -> plugin.manager.email_builder". in /app/web/core/lib/Drupal/Component/DependencyInjection/Container.php:147
🇨🇭Switzerland megadesk3000

I experience the same issue using Version 1.12.0 of minifyhtml together with Drupal 9.5.3
If i enable the option "Strip comments from the source HTML" i receive an empty response which results in the browser's 404 page beeing shown.

🇨🇭Switzerland megadesk3000

I experience the exact same issue on the 4.x branch with D9.5 and PHP 8.1

🇨🇭Switzerland megadesk3000

I have the same issue still in the 2.x Version of entity_clone.
The issue I have is with cloning a user more than once.

Steps to reproduce:
1. Create a user with name "user_original"
2. Clone the user the first time. No errors occur. The user gets cloned correctly.
3. Clone the "original" user once again. Now I get the "integrity constrained violation"

Drupal\Core\Entity\EntityStorageException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'user_original_cloned-de' for key 'user__name': INSERT INTO "users_field_data" ("uid", "langcode", "preferred_langcode", "preferred_admin_langcode", "name", "pass", "mail", "timezone", "status", "created", "changed", "access", "login", "init", "default_langcode") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13, :db_insert_placeholder_14); 

I w ill try to provide a patch, that makes the cloned username unique by adding a suffix to the cloned username if needed.

🇨🇭Switzerland megadesk3000

I can confirm, that the error occurs and the patch fixes it.

Production build 0.69.0 2024