Problem/Motivation
I'm using Drupal 10.3.6 and updating all_in_one_accessibility from 1.5.10 to 1.5.11 (ddev on Ubuntu).
After requiring the module with the composer and running the drush updb I received this message:
> [warning] Undefined variable $filename UpdateDBCommands.php:305
> [warning] Post update function all_in_one_accessibility_post_update_call_api not found in file .php
> [error] Update failed: all_in_one_accessibility_post_update_call_api
[error] Update aborted by: all_in_one_accessibility_post_update_call_api
[error] Finished performing updates.
Failed to run drush updb: exit status 1
Steps to reproduce
composer require 'drupal/all_in_one_accessibility:^1.5'
drush updb
All other database updates were installed without any issues.
For now, I resolved it using: https://mysite.com/update.php, but I'm curious why drush updb shows the message presented above.
Comments
Comment #2
poedan commentedMoved the code in a post update file.
Comment #3
rajesh bhimani commentedWe are unable to replicate the issue. If anyone else experiences the same problem, please share a video recording.
Comment #4
vensiresI have reproduced the error using the following steps in Drupal 10.5.6.
drush en all_in_one_accessibility)drush -y updband the "No pending updates" message will be returned.drush -y cexto export the configuration files.drush -y pmu all_in_one_accessibility)drush -y cimto import the configuration and simultaneously enable the moduledrush -y updband you will see the following output.Comment #6
vensiresI have created a MR but it actually implements the fix from #2!
Comment #7
vensiresAdding a new patch from the MR. Patch from #2 doesn't seem to apply anymore.
Comment #8
volegerMR provides the correct placement of the post-update function. +1 for RTBC
Comment #9
volegerNeeds work after the recent update. Needs rebase due to changes in function calls and CURL_OPT set updates.
Comment #10
vensiresMR updated. Uploading latest patch too.
Comment #11
volegerComment #12
vensires@voleger thank you for the review! Code has been properly restored!
Also, uploading latest patch, hiding the previous one.
Comment #13
volegerMuch better, thanks
Comment #14
rajesh bhimani commentedThank you for sharing patch, we have applied fixes with the new verison 1.5.18. kindly request to review and close this issue.
Comment #16
volegerRelease is broken due to leftover artifacts of unfinished merge conflict resolution session.
Comment #17
volegerCreated a follow-up issue #3592683: Fix error in install file