magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.49k stars 9.29k forks source link

[Issue] Property "ShowDefaultNotificationMessage" does not have accessor method #29707

Open m2-assistant[bot] opened 4 years ago

m2-assistant[bot] commented 4 years ago

This issue is automatically created based on existing pull request: magento/magento2#26056: Property "ShowDefaultNotificationMessage" does not have accessor method


Description (*)

If you want create queue which will triggered whem you will save product in the admin (I created plugin afterSave for the Magento\Catalog\Model\ResourceModel\Product::save()), you will get critical error - Property "ShowDefaultNotificationMessage" does not have accessor method "setShowDefaultNotificationMessage" in class "Magento\CatalogInventory\Api\Data\StockItemInterface". Even if you do not use this interface in your extension, you still get an error.

Fixed Issues (if relevant)

Manual testing scenarios (*)

  1. Create simple rabbitmq queue extension
  2. Create plugin afterSave for the Magento\Catalog\Model\ResourceModel\Product::save()
  3. Set up consumer
  4. Save product in the admin panel
  5. Run php bin/magento queue:consumers:start YourConsumerName
  6. Got error)

Questions or comments

Contribution checklist (*)

github-jira-sync-bot commented 3 years ago

Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x, ^Area:.*

Once all required labels are present, please add Issue: Confirmed label again.

github-jira-sync-bot commented 3 years ago

:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-997 is successfully created for this GitHub issue.

m2-assistant[bot] commented 3 years ago

:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

crippsy14 commented 1 year ago

Just to confirm, this is still an issue. Can I confirm if the accessor method is being added into the interface?

mamsincl commented 3 months ago

still issue, please

freshly duplicated on 2.4.6-p5 - product pushed to queue initially and failed to hydrated back is obtained by productRepository in adminhtml area

update: as a quick workaround, resetting the related extension attribute (since related interfaces/classes are marked as deprecated, really no see any chance of getting any official solution)

$product->getExtensionAttributes()->setData('stock_item', null);