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.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

almador created an issue. See original summary.

poedan’s picture

Moved the code in a post update file.

rajesh bhimani’s picture

Status: Active » Closed (cannot reproduce)

We are unable to replicate the issue. If anyone else experiences the same problem, please share a video recording.

vensires’s picture

Version: 1.5.10 » 1.5.x-dev
Status: Closed (cannot reproduce) » Active

I have reproduced the error using the following steps in Drupal 10.5.6.

  1. Install the module successfully (ex. drush en all_in_one_accessibility)
  2. Execute drush -y updb and the "No pending updates" message will be returned.
  3. Configure the module
  4. Execute drush -y cex to export the configuration files.
  5. Uninstall the module (ex. drush -y pmu all_in_one_accessibility)
  6. Execute drush -y cim to import the configuration and simultaneously enable the module
  7. Execute drush -y updb and you will see the following output.
  8.  -------------------------- ----------- ------------- ----------------------- 
      Module                     Update ID   Type          Description            
     -------------------------- ----------- ------------- ----------------------- 
      all_in_one_accessibility   call_api    post-update   Post update callback.  
     -------------------------- ----------- ------------- ----------------------- 
     // Do you wish to run the specified pending updates?: yes.
    >  [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.
    

vensires’s picture

Status: Active » Needs review

I have created a MR but it actually implements the fix from #2!

vensires’s picture

Priority: Normal » Major
StatusFileSize
new5.68 KB

Adding a new patch from the MR. Patch from #2 doesn't seem to apply anymore.

voleger’s picture

Status: Needs review » Reviewed & tested by the community

MR provides the correct placement of the post-update function. +1 for RTBC

voleger’s picture

Status: Reviewed & tested by the community » Needs work

Needs work after the recent update. Needs rebase due to changes in function calls and CURL_OPT set updates.

vensires’s picture

Status: Needs work » Needs review
StatusFileSize
new2.81 KB

MR updated. Uploading latest patch too.

voleger’s picture

Status: Needs review » Needs work
vensires’s picture

Status: Needs work » Needs review
StatusFileSize
new5.72 KB

@voleger thank you for the review! Code has been properly restored!

Also, uploading latest patch, hiding the previous one.

voleger’s picture

Status: Needs review » Reviewed & tested by the community

Much better, thanks

rajesh bhimani’s picture

Status: Reviewed & tested by the community » Fixed

Thank you for sharing patch, we have applied fixes with the new verison 1.5.18. kindly request to review and close this issue.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

voleger’s picture

Release is broken due to leftover artifacts of unfinished merge conflict resolution session.

voleger’s picture

Created a follow-up issue #3592683: Fix error in install file

Status: Fixed » Closed (fixed)

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