apigee / apigee-m10n-drupal

Add monetization features to a Drupal developer portal
https://www.drupal.org/project/apigee_m10n
GNU General Public License v2.0
13 stars 13 forks source link

Failed database update v2.0.3 to v2.0.5 #428

Closed cen1 closed 1 year ago

cen1 commented 1 year ago

Description

After updating Drupal to latest and plugin from v2.0.3 to v2.0.5 and running update.php I get an error.

Pending update: apigee_m10n module • 8203 - Updating apiProduct field display in xrate-plan default display mode and enabling 'view xproduct' permission for authenticated user.

[proxy_fcgi:error] [pid 4303:tid 140499095316032] [client <redacted>] AH01071: Got error 'PHP message: TypeError: Unsupported operand types: array + null in /var/www/<redacted>/web/modules/contrib/apigee_m10n/apigee_m10n.install on line 167 #0 /var/www/<redacted>/web/core/includes/update.inc(230): apigee_m10n_update_8203()\n#1 /var/www/<redacted>/web/core/includes/batch.inc(295): update_do_one()\n#2 /var/www/<redacted>/web/core/includes/batch.inc(137): _batch_process()\n#3 /var/www/<redacted>/web/core/includes/batch.inc(93): _batch_do()\n#4 /var/www/<redacted>/web/core/modules/system/src/Controller/DbUpdateController.php(186): _batch_page()\n#5 [internal function]: Drupal\\system\\Controller\\DbUpdateController->handle()\n#6 /var/www/<redacted>/web/core/lib/Drupal/Core/Update/UpdateKernel.php(115): call_user_func_array()\n#7 /var/www/<redacted>/web/core/lib/Drupal/Core/Update/UpdateKernel.php(76): Drupal\\Core\\Update\\UpdateKernel->handleRaw()\n#8 /var/www/<redacted>/web/update.php(27): Drupal\\Core\\Update\\UpdateKernel->handle()\n#9 {main}', referer: https://<redacted>/update.php/start?id=8&op=start

This is blocking a security update in our production so I would appreciate some assistance.

Version Info

Drupal 9.5.7 Updating from m10n v2.0.3 to v2.0.5 Using Kickstart package with composer dependency update.

giteshk commented 1 year ago

@cen1 What version of PHP are you running?

cen1 commented 1 year ago

Using PHP 8.1.2-1ubuntu2.11

Please not that this issue was also raised though GCP support.

giteshk commented 1 year ago

We have identified the issue. Here is a patch to try out.

This happens when Product field is disabled from the xplan entity display settings (admin/config/apigee-monetization/rate-plan-x/display)

issue_428.patch

cen1 commented 1 year ago

Ty, will report back by the end of the week.

cen1 commented 1 year ago

@giteshk the patch seems to work. Any chance to get a minor release for this soon so we don't have to patch it manually?

giteshk commented 1 year ago

@cen1 We will do a minor release this week.