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.52k stars 9.31k forks source link

Magento 2.4.5-p1 Repository save not working #36740

Open smitakagwade opened 1 year ago

smitakagwade commented 1 year ago

Preconditions (*)

  1. Magento version 2.4.5-p1
  2. Php 8.1

Steps to reproduce (*)

  1. try below code to set name to the category

  2. $category = $this->categoryRepository->get(4); $category->setName("Test"); $this->categoryRepository->save($category);

  3. I am trying to save category using this way ,

  4. But after click on save, page becomes unresponsive and Magento stops working

Expected result (*)

  1. Category Should be saved properly with repository save method

Actual result (*)

  1. Page becomes unresponsive and just showing loader on page image

Custom Module that helps in issue reproduction

Magz.zip

m2-assistant[bot] commented 1 year ago

Hi @smitakagwade. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

m2-assistant[bot] commented 1 year ago

Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Bravo commented 1 year ago

Hi @smitakagwade,

Thank you for reporting and collaboration.

Verified the issue on Magento 2.4-develop instance and the issue is not reproducible. Kindly refer the screenhsots.

Steps to reproduce

1.try below code to set name to the category

2.$category = $this->categoryRepository->get(4); $category->setName("Test"); $this->categoryRepository->save($category);

We are able to save the category name without any error.

Screenshot 2023-01-13 at 1 51 20 PM

Kindly recheck the behavior on Magento 2.4-develop instance and elaborate steps to reproduce if the issue is still reproducible.

Thanks.

smitakagwade commented 1 year ago

Hello @engcom-Bravo, I want to save this programmatically, not from frontend . Repository save function is not working for category .

I want to save categories custom attribute values as well as default attributes using category repository.

I have written this code on catalog_category_save_after observer.

m2-assistant[bot] commented 1 year ago

Hi @engcom-Hotel. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Hotel commented 1 year ago

Hello @smitakagwade,

Thanks for the reporting and collaboration!

We have tried to reproduce the issue in Magento 2.4-develop and the issue is reproducible for us. The page was unresponsive and after sometime we are getting the below page:

image

In order to reproduce the issue, we have made the custom module. We are attaching the same for reference: Magz.zip

Hence confirming the issue.

Thanks

github-jira-sync-bot commented 1 year ago

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

m2-assistant[bot] commented 1 year ago

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