Skip to content

Error when run command setup:upgrade with custom DB trigger #38481

Closed
@manhtranisobar

Description

@manhtranisobar

Preconditions and environment

  • Magento 2.4.7-beta2

Steps to reproduce

  • Access to database and create a custom trigger AFTER INSERT to store table with name trg_test_mview
  • Run command bin/magento setup:upgrade

Expected result

The command bin/magento setup:upgrade is ran successfully

Actual result

An error appeared:
Warning: Trying to access array offset on value of type null in vendor/magento/framework/Mview/View/Subscription.php on line 357

Additional information

  • This issue come from function \Magento\Framework\Mview\TriggerCleaner::removeTriggers
  • File line: vendor/magento/framework/Mview/TriggerCleaner.php:90

It seems there are 2 conditions to error appear:
A custom trigger with name format which is different from other Mview triggers.
This custom trigger is created for tables, that are used by Mview config.

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: FrameworkComponent: MviewIssue: needs updateAdditional information is require, waiting for responsePriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneReported on 2.4.7-beta2Indicates original Magento version for the Issue report.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions