Adding patch file
peacog β created an issue.
The new release works great. Thanks for merging it so quickly!
Peacog β created an issue.
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'],
];
}
}
Peacog β changed the visibility of the branch 2.0.x to hidden.
Peacog β changed the visibility of the branch 3454659-implement-duplicate-detection to active.
Peacog β changed the visibility of the branch 3454659-implement-duplicate-detection to hidden.
Peacog β changed the visibility of the branch 3454659-duplicate-detection-service to hidden.
Peacog β changed the visibility of the branch 3454659-duplicate-detection-service to active.
Peacog β changed the visibility of the branch 3454659-duplicate-detection-service to hidden.
Peacog β created an issue.
Can't reproduce this so closing it.
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!
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
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');
I've create a separate issue for the directory structure problem: π Webp derivatives not refreshed when files stored in sub-directory Needs review
Peacog β created an issue.
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.
I've reverted my commit because the patch would not apply. I think the MR branch needs to be rebased.
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"
Peacog β made their first commit to this issueβs fork.
Peacog β created an issue.
Peacog β created an issue.
Peacog β created an issue.
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.
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.
I'm on Drupal 9.5.10
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
Peacog β created an issue.
Closing because can't reproduce problem.
Peacog β created an issue.
Created a MR that solves this.
Peacog β made their first commit to this issueβs fork.
The MR adds the proposed change. It looks like this:
Wide screens
Narrow screens
Peacog β created an issue.
Thank you. That's a much better solution :)
Added missing schema for tests
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.
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.
Re-roll needed because NodeAdminTest.php directory was changed in 8.3.3.
I've addressed @alexpott's and @vegardjo's comments in this re-roll :)