Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've come across a use case where the serialized data to be stored in the filter field of the backup_migrate_profiles table exceeds the maximum lenth of the field type - text - 64kb.
Commonly this will produce the following error
PHP Notice: unserialize(): Error at offset 65505 of 65535 bytes
in both -
- ctools/includes/export.inc on line 820
- backup_migrate/includes/crud.inc on line 545
Proposed solution would be to update the filter field size to medium.
Further, Backups created with these profiles still run regardless of errors.
Comment | File | Size | Author |
---|---|---|---|
#8 | backup_migrate-n2663066-8.patch | 1000 bytes | DamienMcKenna |
| |||
#8 | backup_migrate-n2663066-8.interdiff.txt | 1.19 KB | DamienMcKenna |
#5 | backup_migrate-n2663066-interdiff-4_5.txt | 1.06 KB | BrankoC |
#5 | backup_migrate-n2663066-5.patch | 1.48 KB | BrankoC |
| |||
#4 | backup_migrate-n2663066-4.patch | 1.43 KB | BrankoC |
|
Comments
Comment #2
bsains CreditAttribution: bsains commentedComment #3
DamienMcKennaPlease remember to update the issue status to 'needs review' when you upload a patch.
I think this should be good, but it needs a little tidying up to match the Drupal coding standards.
Comment #4
BrankoC CreditAttribution: BrankoC as a volunteer commentedThis is a reroll to make sure the patch can be used again.
Furthermore:
1) I have looked at the coding standards issues.
2) I have removed the return value, because it was of the incorrect type (array, should have been string) and was extraneous.
3) I am not including an interdiff because it would be longer and less readable than the patch itself.
Comment #5
BrankoC CreditAttribution: BrankoC as a volunteer commentedI guess it is bad form to introduce more coding standards violations than you take out, so here is another patch with more reasonable line lengths.
Comment #6
BrankoC CreditAttribution: BrankoC as a volunteer commentedComment #7
izmeez CreditAttribution: izmeez commentedPatch in #5 applies without difficulty to the latest 7.x-3.x-dev 2019-09-18 and does not cause any problems.
Comment #8
DamienMcKennaThis needed to be in a new update script.
Comment #10
DamienMcKennaCommitted. Thanks!