Magento 2.4.5-p1 Repository save not working
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 12.2k
- Forks
- 9.4k
- PR merge metrics
- No merged PRs in 30d
Description
Preconditions (*)
- Magento version 2.4.5-p1
- Php 8.1
Steps to reproduce (*)
-
try below code to set name to the category
-
$category = $this->categoryRepository->get(4); $category->setName("Test"); $this->categoryRepository->save($category); -
I am trying to save category using this way ,
-
But after click on save, page becomes unresponsive and Magento stops working
Expected result (*)
- Category Should be saved properly with repository save method
Actual result (*)
- Page becomes unresponsive and just showing loader on page
Custom Module that helps in issue reproduction
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the hang with the categoryRepository get/setName/save sequence in the attached Magz.zip custom module on Magento 2.4.5-p1 with PHP 8.1. Trace the repository save path and compare it with the expected category update behavior; done means the save completes and the category name is persisted without the page becoming unresponsive.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100