-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates expect .module
file to be available (Error when running updates for 1.x-1.0.26)
#160
Comments
Thanks for reporting, @manu-mei-singh. Apparently there are certain instances when the update hook is run before Backdrop includes the main backup_migrate.module file. This is strange. As a stopgap measure, you may want to change line 632 of backup_migrate.install manually from: TO: Then run update.php again. Please report back here. |
Actually, that may not work, since line 7 of Anyway, you may want, instead, to try this (replace the function as follows): /**
* Add the exclude_filepaths configuration for the new "DB and active config" source to all profiles.
*/
function backup_migrate_update_1009() {
include_once (BACKDROP_ROOT . '/' . backdrop_get_path('module', 'backup_migrate') . '/backup_migrate.module');
backup_migrate_include('profiles');
foreach (backup_migrate_get_profiles() as $profile) {
if (!isset($profile->filters['sources']['db_config']['exclude_filepaths'])) {
$profile->filters['sources']['db_config']['exclude_filepaths'] = '';
$profile->save();
}
}
} Then try running update.php again. |
EDIT: I pasted the wrong function. Now fixed. This function is in |
Hi @argiepiano , yup that worked. |
Thansk, @manu-mei-singh. Would you post here some of the warnings? Was this a D7 upgrade site, or "native" Backdrop? Also, it possible, it'd be helpful to know what contrib modules you have installed in the site. Given that BM is so widely used, I'd like to be sure other people don't run into this, so if there is a bug, I'd like to find it. |
Hi @argiepiano , This was update was performed on a staging "native" backdrop site. I ran the update via the web (core/update.php). Here are the warning messages from the logs: Warning: Trying to access array offset on value of type bool in backup_migrate_item->decode_db_row() (line 549 of /backdrop_root/modules/backup_migrate/includes/crud.inc). Warning: foreach() argument must be of type array|object, null given in backup_migrate_item->decode_db_row() (line 549 of /backdrop_root/modules/backup_migrate/includes/crud.inc). And it looks like I got few of these warnings. To confirm that the update did work, I ran The other contrib modules are IMCE and CiviCRM. hope that helps and thanks for the all your work on this! |
@argiepiano This is expected, no module files should ever be loaded at update time. You can't depend on module code working at the time modules are updated. Consider an upgrade from Drupal 7 - if the schema were in one state for D7 but the Backdrop As such, i would not recommend doing a It's strange that you found an instance where those files were loaded at update time - opcode cache maybe?. Is it possible this explains some of the other issues with updates, like #158? |
.module
file to be available (Error when running updates for 1.x-1.0.26)
@jenlampton, yes, I was leaning toward that explanation. I'll figure out a solution. |
Hey ya'll,
I am updating Backup Migrate on a number of Backdrop instances.
When I try and the database updates on for backup_migrate-1.x-1.0.26 on Backdrop 1.27.1
I get the following error when I run bee -y updb on the command line :
Error: Call to undefined function backup_migrate_include() in backup_migrate_update_1009() (line 632 of /var/www/path/to/root/directory/modules/backup_migrate/backup_migrate.install).
If I run the web update I get the following error:
An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: https:///directory.fake/core/update.php?op=selection&token=va-qAhj8U0PAJASE3GxdtneHT_n5y0n6Ox_ULVF_zWM&id=59&op=do_nojs&op=do StatusText: Service unavailable (with message) ResponseText: Error: Call to undefined function backup_migrate_include() in backup_migrate_update_1009() (line 632 of var/www/path/to/root/directory/modules/backup_m
Note that I've changed the file paths to protect clients.
Any help would be greatly appreciated!
thanks!
Manu
The text was updated successfully, but these errors were encountered: