ACSD-56741: Troubleshooting database setup errors with custom MySQL triggers

The ACSD-56741 patch fixes the issue where an error message Trying to access array offset on value of type null appears during setup:upgrade due to a custom MySQL trigger in the database unrelated to indexation and MView. This patch is available when the Quality Patches Tool (QPT) 1.1.48 is installed. The patch ID is ACSD-56741. Please note that the issue is scheduled to be fixed in Adobe Commerce 2.5.0

Affected products and versions

The patch is created for Adobe Commerce version:

  • Adobe Commerce (all deployment methods) 2.4.6-p3

Compatible with Adobe Commerce versions:

  • Adobe Commerce (all deployment methods) 2.4.6 - 2.4.6-p4
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe Commerce version, update the magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.

Issue

An error message Trying to access array offset on value of type null appears during setup:upgrade due to a custom MySQL trigger in the database unrelated to indexation and MView.

Steps to reproduce:

  1. Run php bin/magento indexer:set-mode schedule.

    code language-none
    DELIMITER //
    CREATE TRIGGER trg_catalog_category_entity_before_delete_umis BEFORE DELETE ON catalog_category_entity FOR EACH ROW
        -> BEGIN
        -> UPDATE ewave_navigation_menu_item_info as nit INNER JOIN ewave_navigation_menu_category_type as ncmi ON nit.id = ncmi.menu_item_id AND ncmi.category_id = OLD.entity_id SET nit.status = 0;
        -> END //
    
  2. Run php bin/magento c:f.

  3. Run php bin/magento setup:upgrade.

Expected results:

The setup upgrade finishes without any error.

Actual results:

The setup upgrade exits with an error message:

Warning: Trying to access array offset on value of type null.

Apply the patch

To apply individual patches, use the following links depending on your deployment method:

To learn more about Quality Patches Tool, refer to:

For info about other patches available in QPT, refer to Quality Patches Tool: Search for patches in the Quality Patches Tool guide.

recommendation-more-help
c2d96e17-5179-455c-ad3a-e1697bb4e8c3