Account created on 11 November 2008, about 16 years ago
#

Merge Requests

More

Recent comments

πŸ‡ͺπŸ‡ΈSpain Peacog

The new release works great. Thanks for merging it so quickly!

πŸ‡ͺπŸ‡ΈSpain Peacog

Here's an example of the custom pre-import event that uses the service in this patch.

<?php

namespace Drupal\my_custom_migrate\EventSubscriber;

use Drupal\migrate\Event\MigrateImportEvent;
use Drupal\migrate_file_to_media\Services\DuplicateDetectionService;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Drupal\migrate\Event\MigrateEvents;

/**
 * Custom migrate event subscriber.
 */
class MyCustomMigrateSubscriber implements EventSubscriberInterface {
  /**
   * The duplicate file detection service.
   *
   * @var \Drupal\migrate_file_to_media\Services\DuplicateDetectionService
   */
  protected DuplicateDetectionService $duplicateDetectionService;

  /**
   * Constructs a MyCustomMigrateSubscriber object.
   *
   * @param \Drupal\migrate_file_to_media\Services\DuplicateDetectionService $duplicateDetectionService
   *   The search links service.
   */
  public function __construct(DuplicateDetectionService $duplicateDetectionService) {
    $this->duplicateDetectionService = $duplicateDetectionService;
  }

  /**
   * Run migrate:duplicate-file-detection before migrate_file_to_media
   * migrations.
   **
   * @param \Drupal\migrate\Event\MigrateImportEvent $event
   *   Response event.
   */
  public function onPreImport(MigrateImportEvent $event) {
    $config = $event->getMigration()->getPluginDefinition();

    if (($config['source']['plugin'] ?? '') !== 'media_entity_generator_d7') {
      return;
    }

    // Run the migrate:duplicate-file-detection command for the migration.
    $this->duplicateDetectionService->duplicateFileDetection($config['id'], [FALSE, TRUE]);
  }

  /**
   * {@inheritdoc}
   */
  public static function getSubscribedEvents() {
    return [
      MigrateEvents::PRE_IMPORT => ['onPreImport'],
    ];
  }

}

πŸ‡ͺπŸ‡ΈSpain Peacog

Peacog β†’ changed the visibility of the branch 2.0.x to hidden.

πŸ‡ͺπŸ‡ΈSpain Peacog

Peacog β†’ changed the visibility of the branch 3454659-implement-duplicate-detection to active.

πŸ‡ͺπŸ‡ΈSpain Peacog

Peacog β†’ changed the visibility of the branch 3454659-implement-duplicate-detection to hidden.

πŸ‡ͺπŸ‡ΈSpain Peacog

Peacog β†’ changed the visibility of the branch 3454659-duplicate-detection-service to hidden.

πŸ‡ͺπŸ‡ΈSpain Peacog

Peacog β†’ changed the visibility of the branch 3454659-duplicate-detection-service to active.

πŸ‡ͺπŸ‡ΈSpain Peacog

Peacog β†’ changed the visibility of the branch 3454659-duplicate-detection-service to hidden.

πŸ‡ͺπŸ‡ΈSpain Peacog

Can't reproduce this so closing it.

πŸ‡ͺπŸ‡ΈSpain Peacog

I'm not able to reproduce the problem any more. Maybe there was a particular combination of versions and patches I was using that caused it. Can we leave the issue open for a while, in case I manage to reproduce the conditions that caused the bug? Thanks!

πŸ‡ͺπŸ‡ΈSpain Peacog

I'm not able to reproduce the problem in πŸ› Webp derivatives not refreshed when files stored in sub-directory Needs review any more. Maybe there was a particular combination of versions and patches I was using that caused it. I've struck through my comment above so it doesn't cause confusion

πŸ‡ͺπŸ‡ΈSpain Peacog

This issue is related to πŸ› Webp derivatives not refreshed when files stored in sub-directory Needs review . When that other issue is merged, the code in the new getWebpCopy() method provided by this patch will need to be updated to
$destination = $this->getWebpDestination($uri, '@directory/@filename.webp');

πŸ‡ͺπŸ‡ΈSpain Peacog

I've create a separate issue for the directory structure problem: πŸ› Webp derivatives not refreshed when files stored in sub-directory Needs review

πŸ‡ͺπŸ‡ΈSpain Peacog

That's right @generalredneck. The bug I found is a new one that's not directly related to speeding up the image flush. The fix could be included in this patch, or in #3177103, or even in a new issue of it's own if you think that's appropriate.

πŸ‡ͺπŸ‡ΈSpain Peacog

I've reverted my commit because the patch would not apply. I think the MR branch needs to be rebased.

πŸ‡ͺπŸ‡ΈSpain Peacog

Thanks for this fix. I've found a problem with it when the image file is stored in a subdirectory. Currently the webp derivative is stored in the root of the style directory, even if the original file is stored in a subdirectory. For example if the directory is configured as [date:custom:Y]-[date:custom:m] the uploaded file will be files/2024-03/image.jpg but the webp derivative will be files/styles/my-style/public/2024-03image.jpg. The code in webp_image_style_flush looks for the derivative in the subdirectory but doesn't find it, so it doesn't get refreshed.

We can solve the problem by storing the derivative in the same directory structure as the original file. To do that change the template in calls to getWebpDestination() to "@directory/@filename"

πŸ‡ͺπŸ‡ΈSpain Peacog

Peacog β†’ made their first commit to this issue’s fork.

πŸ‡ͺπŸ‡ΈSpain Peacog

What you did is not quite right @cestmoi. Assuming your field group is in the Book content type, the entity id is book. The new file you created in the LANGUAGE directory should be named either core.entity_form_display.node.book.full.yml if your field group is on the node edit form, or core.entity_view_display.node.book.full.yml if the field group is on the node view display.

The file only needs to contain the parts relevant to the field group strings you want to translate e.g.

third_party_settings:
  field_group:
    group_your_group_id:
      format_settings:
        label: 'The translated label'
        description: 'The translated description'
      label: 'The translated label'

After that import the configuration with drush cim and you should see your translations.

πŸ‡ͺπŸ‡ΈSpain Peacog

Hi @thomas.frobieter. The patch is to improve visibility when you're using the sidebar, vertical toolbar. With the vertical toolbar the indicator color strip is down the left side of the screen, not across the top. It looks like this (without the patch)

It doesn't stand out much and is easy to miss on a busy screen.

πŸ‡ͺπŸ‡ΈSpain Peacog

Reopening this because the patch in πŸ› gin-table-scroll-wrapper prevents nested paragraph buttons from being clickable Fixed doesn't solve the problem for me. Can you take another look at this patch? Thanks

πŸ‡ͺπŸ‡ΈSpain Peacog

Closing because can't reproduce problem.

πŸ‡ͺπŸ‡ΈSpain Peacog

The MR adds the proposed change. It looks like this:

Wide screens

Narrow screens

πŸ‡ͺπŸ‡ΈSpain Peacog

Thanks @Luke.Leber for the patch. I would like to see this being a configurable option. I think it makes sense to have a setting on the Elements configuration page that is off by default but that can be switched on to enable nationalMode. I've created a patch for 6.1.x that does that.

πŸ‡ͺπŸ‡ΈSpain Peacog

I am seeing this error too. The javascript error is caused by lines 10 and 11 in gin_lb_preview_regions.js. The expected elements with id #glb-toolbar-preview-regions and #glb-toolbar-preview-content don't exist. The elements don't exist because gin_lb_preprocess_toolbar__gin_lb is never called.

Production build 0.71.5 2024