Problem/Motivation

Sites with many modules and roles fail to backup with the character limitations of the backup column

Steps to reproduce

Create backup on a site with many roles and modules and the backup will fail

Proposed resolution

Change backup column to LONGTEXT

CommentFileSizeAuthor
#2 longtextbackup-2.patch409 bytesnatefollmer

Comments

nfollmer created an issue. See original summary.

natefollmer’s picture

StatusFileSize
new409 bytes

Patch to change schema for backup column

natefollmer’s picture

Status: Active » Needs review
natefollmer’s picture

Related fix for D7 version, because I filtered issues by 8 before checking for a patch. What a n00b move on my part.

https://www.drupal.org/project/backup_permissions/issues/2947295

meangreen’s picture

Patch works, I tested personally on our live site (because we have lots of roles and many permissions) and it'd bug out because the payload was too big for the database column.

I'm running Drupal 9, the latest. Good work @natefollmer !

I would recommend adding the following to the backup_permissions.install file, just
so that way if someone uninstalls the module then it'll drop the backup_permissions table.

/**
 * hook_uninstall
 * deletes schema upon module uninstall
 */
function backup_permissions_uninstall(){
    drupal_uninstall_schema('backup_permissions');
}
natefollmer’s picture

Good call @dazdiggityz and thanks for testing!

geoanders’s picture

Status: Needs review » Fixed
geoanders’s picture

Version: 2.0.0 » 2.x-dev
Status: Fixed » Closed (fixed)