magento / magento/magento2

Magento 2.4.5-p1 Repository save not working

Open
#36,740 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area: Framework Component: Catalog Issue: Confirmed Priority: P2 Progress: ready for dev Reported on 2.4.5-p1 Reproduced on 2.4.x Triage: Dev.Experience
Dominant language
PHP
Stars
12.2k
Forks
9.4k
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.