Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute with "Used for Sorting in Product Listing" in combination with huge config products causes the product not to show on the category page #35956

Open
1 of 5 tasks
t-heuser opened this issue Aug 16, 2022 · 22 comments
Assignees
Labels
Area: Frontend Component: ConfigurableProduct Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: dev in progress Reported on 2.4.5 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@t-heuser
Copy link

t-heuser commented Aug 16, 2022

Preconditions and environment

  • Magento version: 2.4.5
  • PHP 7.4

Steps to reproduce

  1. Set the "Used for Sorting in Product Listing" for the attribute "Name" to true
  2. Create a configurable product with a long name (64 characters) and more than 600 single products
  3. Create a category
  4. Assign this product to the category
  5. Ensure, all products are in stock, enabled and associated with the active website

Expected result

The product is shown on the relevant assigned category page

Actual result

The product is not displayed on the category page and can also not be retrieved via the GraphQl "products" query.

Additional information

With less than 560 configurations the product is shown on the relevant assigned category page. The issue only happens when you have more than 560 (may not be exact number) configurations

This is a follow up ticket for #35765 where this issue was observed initially.
There you can see that the border was at 350 configurations and that the issue wasn't reproducible anymore at any time on the development Magento version.

But the issue is now reproducible in the development Version with 560 single products assigned to the configurable product.

I also tested it locally and viewed the ElasticSearch Index, the product never gets written into the index.

This is a very critical issue for us as we have products with more than 1000 configurations.

UPDATE

As written below, the issue is not the number of single products assigned to a config, it's the maximum field length in ElasticSearch which causes the product not to be indexed. ElasticSearch has a maximum field length of 32766 characters.
When you set "Used for Sorting in Product Listing" to true for the attribute "Name" (this works for all attributes, name is just the easiest for reproducing) all values for "Name" for all single products are written into one field which can exceed the character limit with a lot of single products. Then the product is silently not written into the index and not shown in categories or the search.
For more details see #28966 (comment)

Thanks a lot to @thlassche !

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
@m2-assistant
Copy link

m2-assistant bot commented Aug 16, 2022

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

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

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.


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 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.

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

@m2-assistant
Copy link

m2-assistant bot commented Aug 17, 2022

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: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Bravo
Copy link
Contributor

engcom-Bravo commented Aug 18, 2022

Hi @oneserv-heuser,

Thank you for reporting and collaboration.

Verified the issue on both 2.4.5 and 2.4-develop instance as well but could not reproduce the issue. Kindly refer screenshots.

Creating a configurable product with 560+ configurations.

36

38

39

40

d

41

Let us know if we are missing anything.

Thanks.

@engcom-Bravo engcom-Bravo added the Issue: needs update Additional information is require, waiting for response label Aug 18, 2022
@t-heuser
Copy link
Author

@engcom-Bravo Can you see the product in the category view? The product view always works, regardless of the number of assigned single products. But it's not shown in the category view.
I tried this several times with several different and new products and it never works. Everything is enabled, in stock, assigned to the correct website, has a price, index is rebuild and cache is cleaned.
You must have done something different than me because I have a reproduction rate of 100% and I'm also not the only one to have this problem as you can see in #35765

@t-heuser
Copy link
Author

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @oneserv-heuser. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

Hi @oneserv-heuser, here is your Magento Instance: https://96534a2aa5b56e6ea8efb74e4430643e.instances.magento-community.engineering
Admin access: https://96534a2aa5b56e6ea8efb74e4430643e.instances.magento-community.engineering/admin_826f
Login: 55d1d84f
Password: efa4f0b2c6bd

@thlassche
Copy link
Contributor

Probably related to this: #28966 (comment)

@engcom-Bravo
Copy link
Contributor

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

@engcom-Bravo
Copy link
Contributor

Hi @oneserv-heuser,

Thanks for quick response.

We are able to see the product with 560+ configurations in a category view. After adding products to Category view kindly do REINDEXING and CACHEFLUSH.

Kindly check your system requirements.

Thanks.

@t-heuser
Copy link
Author

t-heuser commented Aug 22, 2022

@thlassche You're absolutely right, this is related and applying your patch fixes the issue. Thanks a lot!

So, @engcom-Bravo can you please read the thread in #28966 and especially the comment from @thlassche

Probably related to this: #28966 (comment)

I think you should be able to reproduce the issue when setting "Yes" for "Use for Sort" for the attributes you're using and/or for the attribute "name".

Very unfortunate that the other ticket is closed, even if it's an existing issue which was said by several users.

@t-heuser
Copy link
Author

To summarize:
The problem is NOT the pure number of single products assigned to a config, it's the maximum field length in ElasticSearch which causes the product not to be indexed.
To reproduce you must do the following:

  • Set the "Used for Sorting in Product Listing" for the attribute "Name" to true
  • Create a configurable product with a long name and as many single products assigned that the combined number of characters for all the names of the products is bigger than 32766

That works for any attribute which has "Used for Sorting in Product Listing" set to true, but using "Name" is the easiest way.

@t-heuser t-heuser changed the title 560 or more configurations causes the product not to show on the category page Attribute with "Used for Sorting in Product Listing" in combination with huge config products causes the product not to show on the category page Aug 22, 2022
@engcom-Bravo engcom-Bravo added Area: Frontend and removed Issue: needs update Additional information is require, waiting for response labels Aug 22, 2022
@engcom-Bravo
Copy link
Contributor

Hi @oneserv-heuser,

Thanks for quick response.

We are not able to Create a configurable product with a long name ( Atleast 100 characters).Kindly please confirm.

kvkk

We can enter upto 64 characters.

Thanks.

@github-jira-sync-bot
Copy link

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

@m2-assistant
Copy link

m2-assistant bot commented Aug 22, 2022

✅ 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.

@engcom-Bravo engcom-Bravo self-assigned this Aug 22, 2022
@t-heuser
Copy link
Author

@engcom-Bravo Well, the 100 was only to make it as long as possibe to exceed the maximum length of 32766 characters in ElasticSearch with fewer assigned single products. Then just use 64 characters for the name and create more single products.

Don't know why you first confirm the issue and then remove the confirmation because of this nonsense 😆

@engcom-Bravo
Copy link
Contributor

Hi @oneserv-heuser,

Thanks for quick response.

Sorry for cause. we will update as soon as possible.

Thanks.

@engcom-Bravo
Copy link
Contributor

Hi @oneserv-heuser,

Thank you for reporting and collaboration.

Verified the issue on Magento 2.4-develop branch and 2.4.5 we are able to reproduce the issue. Kindly refer the screenshots.

1.Set the "Used for Sorting in Product Listing" for the attribute "Name" to true

At 1

2.Create a configurable product with a long name (64 characters) and more than 600 single products.

Att 1

Att 2

Att 3

Att 4

After creating a configurable Product we are not able to view the product on category page.

Att 5

Hence confirming the issue.

Thanks.

@engcom-Bravo engcom-Bravo added Area: Frontend and removed Issue: needs update Additional information is require, waiting for response labels Aug 22, 2022
@engcom-Bravo engcom-Bravo added Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch and removed Issue: ready for confirmation labels Aug 22, 2022
@engcom-Bravo engcom-Bravo added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Issue: ready for confirmation labels Aug 22, 2022
@github-jira-sync-bot
Copy link

❌ Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.adobe.com/browse/AC-6443

@engcom-Hotel engcom-Hotel added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Aug 22, 2022
@mimou78
Copy link

mimou78 commented Sep 28, 2022

magento give me 2.4-develop instance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Frontend Component: ConfigurableProduct Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: dev in progress Reported on 2.4.5 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
Status: Dev In Progress
Development

No branches or pull requests

6 participants