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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bsains created an issue. See original summary.

DamienMcKenna’s picture

Status: Active » Needs work

Please 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.

BrankoC’s picture

This 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.

BrankoC’s picture

I 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.

BrankoC’s picture

Status: Needs work » Needs review
izmeez’s picture

Status: Needs review » Reviewed & tested by the community

Patch in #5 applies without difficulty to the latest 7.x-3.x-dev 2019-09-18 and does not cause any problems.

DamienMcKenna’s picture

This needed to be in a new update script.

  • DamienMcKenna committed 9ee51ce on 7.x-3.x authored by bsains
    Issue #2663066 by BrankoC, DamienMcKenna, bsains, izmeez: Profile Filter...
DamienMcKenna’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks!

Status: Fixed » Closed (fixed)

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