When you run cronjob - you get an error that $encryption_profile NULL.

TypeError: Argument 5 passed to Drupal\field_encrypt\FieldEncryptProcessEntities::processValue() must implement interface Drupal\encrypt\EncryptionProfileInterface, null given, called in /var/www/html/docroot/modules/contrib/field_encrypt/src/FieldEncryptProcessEntities.php on line 201 in Drupal\field_encrypt\FieldEncryptProcessEntities->processValue() (line 266 of /var/www/html/docroot/modules/contrib/field_encrypt/src/FieldEncryptProcessEntities.php)

Comments

alesbencina created an issue. See original summary.

makbul_khan8’s picture

Still this issue persist, can someone please help to resolve this.

ytsurk’s picture

Can you please specify in what circumstances this occurs?

Running cron is too broad. Was does the cron job do? What fields are encrypted?

My first guess is that $original_encryption_settings is not set, as needed in batch.

makbul_khan8’s picture

After enabling field_encrypt on existing site and enabling 'Field Encryption' on user account fields, all existing field data needs to be encrypted via cron job (admin/config/system/field-encrypt/field-update). This is where I am getting below errors.

TypeError: Argument 5 passed to Drupal\field_encrypt\FieldEncryptProcessEntities::processValue() must implement interface Drupal\encrypt\EncryptionProfileInterface, null given, called in /var/www/html/docroot/modules/contrib/field_encrypt/src/FieldEncryptProcessEntities.php on line 201 in Drupal\field_encrypt\FieldEncryptProcessEntities->processValue() (line 266 of /var/www/html/docroot/modules/contrib/field_encrypt/src/FieldEncryptProcessEntities.php)

Let me know if this helps you to debug the problem.

makbul_khan8’s picture

I am able to fix this issue for my project by deleting cron job for encryption. May be this can helps someone.

ptmkenny’s picture

Status: Active » Closed (outdated)

I'm closing this issue as outdated because the module now has a 3.0 release with a different architecture. Please open a new issue for the 3.x release if this issue is still occurring.