Skip to content

Add Amqp as a dependency for ProductAlert #35790

Open
@Bartiema

Description

@Bartiema

Summary (*)

If the amqp module is not installed in your magento 2.4.4 instance and you want to use the ProductAlert module functionality you will never be able to send alert emails because when the cronjob catalog_product_alert is run there will be a critical error with the message: "Publisher 'product_alert' is not declared"

Steps to reproduce

  • Set a specific product to be out of stock
  • Go to frontend and subscribe to product inventory alert, so the customer gets notified as soon as the product is back in stock
  • Make sure, that the customer alert appears in the product view in the admin area in the Product Alerts section.
  • Put the product back to stock
  • To manually run this cron job from the CLI you could do this
mysql -e "INSERT INTO cron_schedule ( job_code, scheduled_at ) VALUES ( 'catalog_product_alert', CURENT_TIMESTAMP );" && php bin/magento cron:run
  • You will directly get the error message CRITICAL: Publisher 'product_alert' is not declared. [] []
  • Activate Magento_Amqp and do the same again
  • The error will be gone

Examples (*)

.CRITICAL: Publisher 'product_alert' is not declared. [] []
is the error you can find in debug.log after running bin/magento cron:run when the cronjob catalog_product_alert is trying to send an alert.

Proposed solution

Add the amqp module as a dependency for the ProductAlert module, both in composer and in the module.xml


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users with no 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

Labels

Area: FrameworkComponent: CronIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: dev in progressReported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchTriage: 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