An issue with applying a patch during installation

Created on 22 June 2024, 5 months ago
Updated 23 June 2024, 5 months ago

During the installation, the Composer attempts to patch the views_bulk_operations module. The patch application times out, leading to an error.

Could not apply patch! Skipping. The error was: The process "patch '-p0' --no-backup-if-mismatch -d '/Varbase/docroot/modules/contrib/views_bulk_operations' < '/var/folders/2z/y18b_6qn48l6ckwt0w9y7k280000gn/T/66767e9ade8b4.patch'" exceeded the timeout of 300 seconds.

🐛 Bug report
Status

Active

Version

10.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @aaldayel
  • 🇯🇴Jordan Rajab Natshah Jordan

    Thanks, for reporting.

    It exceeded the timeout of 300 seconds. ( you can change the maximum execution timeout in your PHP.ini file )

    Other ways:
    Delete the composer.lock file.
    Run composer install to rebuild the composer.lock without exceeding bit time.

  • Thanks Rajab for your replay and advice, I increased the maximum execution timeout in the PHP.ini file to 600, and I still got the times out error.

    cannot apply patch Issue #3334229: Update existing node entity while changing the ID is not supported when using del  
      ete action (https://www.drupal.org/files/issues/2023-10-24/entity-delete-translation-3334229-7.patch)!  

    The patch changes are minimal and logically sound. I tried profiling using the following code to identify which parts of the code causing delays but logging shows nothing

    class EntityDeleteAction extends ViewsBulkOperationsActionBase {
    
      public function execute($entity = NULL) {
        if ($entity instanceof TranslatableInterface && !$entity->isDefaultTranslation()) {
          try {
            $start_time = microtime(true);
    
            $untranslated_entity = $entity->getUntranslated();
            $untranslated_entity->removeTranslation($entity->language()->getId());
            $untranslated_entity->save();
    
            $end_time = microtime(true);
            \Drupal::logger('EntityDeleteAction')->notice('Translation removal took @time seconds', ['@time' => $end_time - $start_time]);
          }
          catch (EntityStorageException $e) {
            \Drupal::logger('EntityDeleteAction')->error('EntityStorageException: @message', ['@message' => $e->getMessage()]);
          }
          return $this->t('Delete translations');
        }
        else {
          $entity->delete();
          return $this->t('Entity deleted');
        }
      }
    
      public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) {
        $access = $object->access('delete', $account, TRUE);
        return $return_as_object ? $access : $access->isAllowed();
      }
    }
    
    
Production build 0.71.5 2024