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 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 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 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 commentedComment #7
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!