🇪🇸Spain @guardiola86

Account created on 11 June 2010, about 14 years ago
#

Recent comments

🇪🇸Spain guardiola86

Patch in 21 works with 4.2.6. It also hide the element "Selected X items"

🇪🇸Spain guardiola86

The issue happens when adding emojis in the meta description apparently. Not sure if that's fixed in version 2.x.

🇪🇸Spain guardiola86

I tried using Block Class module and didn't work for me. My issue was that I couldn't use the same validate and submit functions that were working in the block edit page, but not when using layout builder. I ended up using something like this:

/**
 * Implements hook_entity_insert().
 */
function embeddocument_block_entity_insert(EntityInterface $entity) {
  _embeddocument_block_entity_insert_or_update($entity);
}

/**
 * Implements hook_entity_update().
 */
function embeddocument_block_entity_update(EntityInterface $entity) {
  _embeddocument_block_entity_insert_or_update($entity);
}

/**
 * Custom callback used by insert and update.
 * 
 * @param $entity
 * @throws \Drupal\Core\Entity\EntityStorageException
 */
function _embeddocument_block_entity_insert_or_update($entity) {
  if (\Drupal::moduleHandler()->moduleExists('block_content')) {
    $entity_langcode = $entity->get('langcode')->value;
    if ($entity->bundle() == 'document') {
      $entity_array = $entity->toArray();
      if (isset($entity_array['field_documents'])) {
        $mid = $entity_array['field_documents'][0]['target_id'];
        if (!empty($mid) && !empty($entity_langcode)) {
          $media = Media::load($mid);
          // If translation doesn't exist, create it.
          if (!$media->hasTranslation($entity_langcode)) {
            $media->addTranslation($entity_langcode, $media->toArray());
          }
          $media->save();
        }
      }
    }
  }
}
🇪🇸Spain guardiola86

I had the setting "'Do nothing. Leave the old alias intact.'" enabled, yet it was creating new aliases when changing the title.

🇪🇸Spain guardiola86

@anneke_vde if I create a content, it generates an alias. If I edit again, the checkbox "Generate automatic URL alias" is checked, although it doesn't generate URLs with '-0' at the end. But if you change the title, the alias is updated.
In my case, I need the alias to stay the same, even if I change the title.

🇪🇸Spain guardiola86

Sorry, just saw you published one patch anneke_vde, I'll give it a try.

🇪🇸Spain guardiola86

This patch checks if there's an existing alias for the domain id. If there's already one, "Generate automatic URL" will be disabled.

🇪🇸Spain guardiola86

Actually, that didn't work. I'm now using dev, pointing to commit d5b61749820c0838b5fec7605f402041421cf72e . That commit is the last one as well in 8.x-1.2, so it's a bit strange that the patch doesn't apply.

🇪🇸Spain guardiola86

Neither the patch nor the merge request diff is working for me. I'm adding a new patch.

🇪🇸Spain guardiola86

The latest merge request patch didn't work for me with version 5.2.3, so I'm using dev version with the latest commit for now.

🇪🇸Spain guardiola86

This patch did not work for me, still says:
drupal/swiftmailer[dev-2.x, 2.4.0] require egulias/email-validator ^2.0||^3

🇪🇸Spain guardiola86

This was for a Drupal 8 site that I'm still managing, in case it's useful for anyone. I had to restrict the "redirect when deleting an element from the cart" to a specific domain.

🇪🇸Spain guardiola86

Important: when configuring the condition, use domain id, not domain name.

🇪🇸Spain guardiola86

Here's a patch updated for 1.x, I've replaced deprecated function drupal_get_path

🇪🇸Spain guardiola86

actually it works, but it breaks this page on submit: /admin/config/content/entityprint

🇪🇸Spain guardiola86

entity-print-2733781-export-word-72.patch isn't working for me, I get this error:

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "Array" plugin does not exist. Valid plugin IDs for Drupal\entity_print\Plugin\EntityPrintPluginManager are: tcpdfv1, phpwkhtmltopdf, dompdf, word_docx in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of /var/www/html/docroot/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
🇪🇸Spain guardiola86

It is not working for me, links still appear in all domains

🇪🇸Spain guardiola86

It's been a while since I did the patch, but I think it doesn't need an update hook.

🇪🇸Spain guardiola86

Actually, that happens if I try to create a normal view and add a relationship. If I create a new view, using the new type, it works.

🇪🇸Spain guardiola86

There is an issue with domains when using drush. I've been debugging and the urls are sometimes mixed, that's why sometimes in a sitemap appear base urls of other domains, not the current site one.
I've made a patch to at least stop that from happening, but probably there's a better fix for that.

🇪🇸Spain guardiola86

I'm reopening this because I don't think it's a duplicate.

🇪🇸Spain guardiola86

I'm having the same issue, works in the UI but not in drush

🇪🇸Spain guardiola86

Here's another patch but is not complete yet, I will probably use another module for now.
Currently I can only add one sitemap and I would need 2 in my case. It will also need to filter by domain when indexing.

🇪🇸Spain guardiola86

I'm having the same issue, I have two domains and that's causing both domains to appear in sitemap.

🇪🇸Spain guardiola86

This is not working for me, I'm using version 1.0-beta8 of the module.

🇪🇸Spain guardiola86

I don't know exactly what causes the issue, but sometimes $this->getEntity($values) is null. I've created a patch that checks if it's null so at least the page can be accessed. In my case it's happening on admin/content

🇪🇸Spain guardiola86

Patch doesn't apply to 1.14.0, but it does to version 1.13.0

🇪🇸Spain guardiola86

In this patch, I'm just updating the file description so the user knows the file name must be the same.

🇪🇸Spain guardiola86

So this works, thanks, but I'm just wondering if we should add a message saying that the file name should be the same or it won't be replaced?

🇪🇸Spain guardiola86

I ended up using this module: https://www.drupal.org/project/imageapi_optimize_webp , which works like a charm with responsive image styles.

Production build 0.69.0 2024