- π¬π·Greece nikitas
I had the same issue. I have solved this by checking the filefields_paths_entity_update hook and modifying it in my custom module like this:
use Drupal\media\MediaInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\filefield_paths\Utility\FieldItem; /** * Implements hook_entity_update(). */ function pixelthis_entity_update(EntityInterface $entity) { if (!$entity instanceof MediaInterface || $entity->bundle() !== 'image') { return; } // The filefield_paths module conflicts with the focal_point module. // If the filefield_paths module is enabled, we need to disable it // for the media.image.field_media_image field. // other wise the focal point will not work. // https://www.drupal.org/project/filefield_paths/issues/3015137 $module_handler = \Drupal::moduleHandler(); foreach ($entity->getFields() as $field) { if (FieldItem::hasConfigurationEnabled($field)) { $settings = FieldItem::getConfiguration($field); // Invoke hook_filefield_paths_process_file(). $module_handler->invokeAll( 'filefield_paths_process_file', [$entity, $field, $settings] ); } } }