🇭🇺Hungary @fox mulder

Account created on 28 February 2009, over 15 years ago
#

Recent comments

🇭🇺Hungary fox mulder

a possible workaround without patching core:

function my_custom_module__field_widget_form_alter(&$element, &$form_state, $context) {
  if ($context['field']['type'] == 'image') {
    foreach ($element as $delta => $child) {
      if (isset($child['#upload_validators']['file_validate_is_image']) && is_array($child['#upload_validators']['file_validate_is_image']) && empty($child['#upload_validators']['file_validate_is_image'])) {
        unset($element[$delta]['#upload_validators']['file_validate_is_image']);
      } 
    }
  }
}
🇭🇺Hungary fox mulder

Hi @vistree!
I ran into a similar problem and I want to test your suggestion but /core/modules/content_translation/src/Plugin/views/filter doesn't exist in core 10.3.5
Can you explain your solution?

🇭🇺Hungary fox mulder

patch added in #35 causes error:
Uncaught PHP Exception TypeError: "draggableviews_views_pre_render(): Argument #1 ($view) must be of type ViewExecutable, Drupal\\views\\ViewExecutable given" at .../web/modules/contrib/draggableviews/draggableviews.module line 276

🇭🇺Hungary fox mulder

The PreparePaymentResponseModel result if I try to connect to non-existent acceptance place doesn't have Status property. The exception comes from this situation.

The attached patch allows more elegant debugging

🇭🇺Hungary fox mulder

I experience the same as TLWatson

Core: 10.3.2
Entity Embed: 8.x-1.6

🇭🇺Hungary fox mulder

Sorry, it was my mistake. I tried to connect to the test.barion.com server in Prod mode.

🇭🇺Hungary fox mulder

Hi everybody!

We use this patch on a hungarian website, but calling iconv() function with 'ISO-8859-1' value in the second parameter replaces special hungarian characters ( eg. 'ő', 'ű' ) to question marks.
I don't uderstand the code, but why is the iconv() call necessary?

🇭🇺Hungary fox mulder

#2 works great

drupal core: 10.2.3
seckit: 2.0.1
xmlsitemap: 8.x-1.5

🇭🇺Hungary fox mulder

maybe duplicate of https://www.drupal.org/project/smart_date/issues/3409287 📌 Deprecation in Drupal 10.2: Smart Date List Item allowed values must be passed as array Active

🇭🇺Hungary fox mulder

I found:
autologout/src/AutologoutManager.php


  public function logout() {
    $user = $this->currentUser;
    if ($this->autoLogoutSettings->get('use_watchdog')) {
      $this->logger->info(
        'Session automatically closed for %name by autologout.',
        ['%name' => $user->getAccountName()]
      );
    }

    // Destroy the current session.
    if (!array_key_exists('HTTP_USER_AGENT', $_SESSION)) {
      $_SESSION['HTTP_USER_AGENT'] = $_SERVER['HTTP_USER_AGENT'];
    }

    if ($_SESSION['HTTP_USER_AGENT'] != $_SERVER['HTTP_USER_AGENT']) {
      $this->moduleHandler->invokeAll('user_logout', [$user]);
      $this->session->destroy();
      $user->setAccount(new AnonymousUserSession());
    }
  }
🇭🇺Hungary fox mulder

@anuj423: where did you place this code in AutologoutManager.php exactly?

🇭🇺Hungary fox mulder

same here, when I try to enable the Empty paragraph filter in a text format where the ckeditor5 is the enabled editor

🇭🇺Hungary fox mulder

I'm sorry for your invested time and attention... The source of the problem is the bad configuration on the Google Maps API, and Place api side
I don't know what's wrong yet, but probably your module works properly

Thank you!

🇭🇺Hungary fox mulder

There are no error message on the screen nor in the logs...

🇭🇺Hungary fox mulder

The site where I want to use the Google reviews module
Core version: 9.4.10
Google reviews version: 1.1.2

simplytest.me test:
Core version: 9.5.8
Google reviews version: 1.1.2

I also tried changing the code on the site where I can access the code of the module. I modified the build() functions of the blocks, but the blocks still don't appear:
GoogleReviewsBlock.php:

  public function build() {
/*
    $config = $this->getConfiguration();
    $reviews = $this->getGoogleData->getGoogleReviews(['rating', 'reviews'], $config['max_google_reviews'], $config['google_reviews_sorting']);
    if (!empty($reviews)) {
      $renderable = [
        '#attached' => ['library' => ['googlereviews/googlereviews.reviews']],
        '#theme' => 'googlereviews_reviews_block',
        '#reviews' => $reviews['reviews'],
        '#place_id' => $reviews['place_id'],
      ];

      return $renderable;
    }
*/
return ['#markup' => t('GoogleReviewsBlock')];
  }

GoogleRatingBlock.php:

  public function build() {
/*
    $rating = $this->getGoogleData->getGoogleReviews([
      'rating',
      'user_ratings_total',
    ]);

    if (!empty($rating)) {
      $rating_percentage = ($rating['rating'] / 5) * 100;

      $renderable = [
        '#attached' => ['library' => ['googlereviews/googlereviews.rating']],
        '#theme' => 'googlereviews_rating_block',
        '#user_ratings_total' => $rating['user_ratings_total'],
        '#rating' => $rating['rating'],
        '#rating_percentage' => $rating_percentage,
        '#place_id' => $rating['place_id'],
      ];

      return $renderable;
    }
*/
    return ['#markup' => t('GoogleRatingBlock')];
  }
🇭🇺Hungary fox mulder

#8 🐛 Exception thrown, when user logs in during checkout. Fixed solves the main problem but i experience a new one when i put something in the cart as anonymous and log in in the first step of the checkout:
Type: commerce_order
Message: RuntimeException: Failed to start the session because headers have already been sent by ".../vendor/symfony/http-foundation/Response.php" at line 384. in Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start() (line 152 of .../vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php).

is there anybody else who experiences this?

core: 9.5.2
commerce core: 8.x-2.33
commerce_combine_carts: 8.x-1.0-rc2
used patch: #8 🐛 Exception thrown, when user logs in during checkout. Fixed

Production build 0.71.5 2024