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.57k stars 9.32k forks source link

Magento 2.4.7 Admin Category Page keeps loading forever #38828

Open talsan74 opened 5 months ago

talsan74 commented 5 months ago

Preconditions and environment

Steps to reproduce

  1. Install default magento 2.4.7
  2. Inserted and deleted categories through rest api
  3. login to admin, goto catalog > category

Expected result

Category Page has to be loaded

Actual result

Category page keeps loading, refreshing the screen or tried with different user or else reindex steps nothing fix the problem.

image

we can see some error on Developer Tools > console image

Additional information

No response

Release note

No response

Triage and priority

m2-assistant[bot] commented 5 months ago

Hi @talsan74. Thank you for your report. To speed up processing of this issue, 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:

m2-assistant[bot] commented 5 months ago

Hi @engcom-Dash. 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-Dash commented 5 months ago

Hi @talsan74

Thanks for reporting and collaboration.

Verified the issue on Magento 2.4 instance and the issue is not reproducable.

Steps to reproduce :

  1. Install default magento 2.4.7
  2. Inserted and deleted categories through rest API
  3. login to admin, goto catalog > category

Please refer the attached screenshots. Let us know if we missed anything.

38828_1 38828_2 38828_3
engcom-Dash commented 4 months ago

Hi @talsan74

As there is no activity on this issue for a long time, we believe the issue has been resolved, hence closing this issue. Feel free to raise a new issue or reopen this if you need more assistance.

Thank you.

matiasgaletto commented 4 months ago

Hi, same issue happening to me. @talsan74, did you find out what was causing it?

matiasgaletto commented 4 months ago

Okay, as far as I have tested, the issue is caused by having the name of a category with a trailing empty space. Instead of "Category Name" it has to be "Category Name ". I haven't been able to reproduce the issue in version 2.4.6-p4 but I was able to do it in 2.4.7 and 2.4.7-p1. So anyone who updates to any of these versions will have this error, which cannot be fixed by a common user. It can only be fixed by making a SQL query to the database. If you check the Dev Tools Console and go to where the parsing error happens you can verify the issue.

Steps to reproduce:

  1. Install Magento 2.4.7 or 2.4.7-p1
  2. Add a category with a trailing space in the name. "Category Name "
  3. Go to Admin Panel > Catalog > Category
  4. Should stay loading forever.
  5. Check Chrome Dev Tools Console, you should see an error message.
  6. Click on the error and see in the file that the parsing error happens where the category name has a trailing space.
matiasgaletto commented 4 months ago

@engcom-Dash could you reopen this? A lot of people are going to have issues if not fixed soon.

xpoback commented 4 months ago

@engcom-Dash Please consider extending your testcase and reopen this issue. I can confirm it is reproducible as mentioned by @matiasgaletto. An additional test case is when the category name has a carriage return symbol in it (\r). Yes, I know that it isn't supposed to be in a category name but neither should the whole page be broken because of a wrong character in the category name. Many merchants will be affected by this, especially those who get their data imported from a PIM and not added by hand in the admin area.

JohnnnyG commented 4 months ago

@engcom-Dash : I also think this needs to be reopened.

I have struggled with this issue for over a month now and by following the above information I was able to run the following query in phpmyadmin to find the problem category names

SELECT * FROM catalog_category_entity_varchar WHERE value LIKE '%\r\n';

Once I edited these to remove any new lines or white spaces on the end of the string the category list populated on the admin part of Magento straight away.

engcom-Dash commented 4 months ago

Hi @talsan74

Thanks for reporting and collaboration.

Verified the issue on the Magento 2.4 dev instance and the issue is reproducible. Hence, we are confirming the issue.

Steps to reproduce:

  1. Install Magento 2.4.7 or 2.4.7-p1
  2. Add a category with a trailing space in the name. "Category Name "
  3. Go to Admin Panel > Catalog > Category
  4. Should stay loading forever.
  5. Check Chrome Dev Tools Console, you should see an error message.
  6. Click on the error and see in the file that the parsing error happens where the category name has a trailing space.

The admin category page keeps loading forever.

Please refer the attached screenshots.

Creating category when category name has a carriage return symbol in it (\r)

Screenshot 2024-07-17 at 6 23 24 PM Screenshot 2024-07-17 at 6 23 20 PM

Try to open the category in admin panel

Screenshot 2024-07-17 at 6 22 57 PM

Error in chrome dev tools console

Screenshot 2024-07-17 at 6 23 12 PM
github-jira-sync-bot commented 4 months ago

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

m2-assistant[bot] commented 4 months ago

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

marctbb commented 1 month ago

Hi all, is there a workaround I can apply while the bug is being officially resolved?

Thanks

lucafuser commented 1 week ago

@magento give me 2.4-develop instance

lucafuser commented 1 week ago

Hi @engcom-Dash i verified the issue on my local Magento 2.4-develop instance and i'm not able to reproduce the issue, could you please verify?

Steps to reproduce (rif. https://github.com/magento/magento2/issues/38828#issuecomment-2233271664):

engcom-Delta commented 4 days ago

Hi @talsan74 ,

Thanks for your reporting and collaboration. We have re-verified the issue in Latest 2.4-develop instance , but we are unable to reproduce the issue. Kindly refer the screenshots.

Steps to reproduce

  1. Inserted and deleted categories through rest api image image
  2. login to admin, goto catalog > category
  3. Observe, page is loading as expected image

Can you please re-verify and confirm if you are still facing the issue. Thanks.

m2-assistant[bot] commented 4 days ago

Hi @engcom-Delta. 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: