Problem/Motivation

Trying to create an advanced backup with encryption (filled in a password) I get following PHP error:

The website encountered an unexpected error. Please try again later.
Error: Call to undefined method Drupal\backup_migrate\Drupal\Filter\DrupalEncrypt::_encryptFile() in Drupal\backup_migrate\Drupal\Filter\DrupalEncrypt->afterBackup() (line 135 of modules/contrib/backup_migrate/src/Drupal/Filter/DrupalEncrypt.php).

Steps to reproduce

Installed Backup&migrate module using composer
Enabeling module
Installing Defuser encryption using composer
Trying to create an advanced backup with Backup Encrytion and Encryption password

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 3197359-2.patch677 byteslarisse

Comments

bart lambert created an issue. See original summary.

larisse’s picture

Status: Active » Needs review
StatusFileSize
new677 bytes

Hi!

The problem was because the name of function that been call was wrong. Fixing the name of function, it works.
This patch fix the problem!

damienmckenna’s picture

Thanks larisse!

@bart lambert: Could you test the patch please, let us know if it solves the problem for you.

hmendes’s picture

Hello!
Tested patch from #2 and it worked, but I saw that when trying to import an encrypted file without checking the decryption checkbox, it shows the error "The file cannot be imported.". Wouldn't it be better to show the user that the error was related to not decrypting the file?
Apart from this suggestion, it appears that the patch solves the problem.

Tested with Drupal 9.1.8 and 'Backup and Migrate' 5.0.x-dev.

bart lambert’s picture

works like a charm now! thanks!

damienmckenna’s picture

Version: 5.0.0-rc2 » 5.0.x-dev
Status: Needs review » Fixed
Parent issue: » #3143649: Plan for Backup and Migrate 5.0.0
Related issues: +#3216193: Improve error handling when backup cannot be decryption if the archive is encrypt

That's excellent news, thank you both for testing patch #2.

I created #3216193: Improve error handling when backup cannot be decryption if the archive is encrypt for improving the error message - that was a good idea hmendes, thank you.

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.