Skip to content

Products added to a category are not shown at the frontend. #19417

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

Closed
addinm opened this issue Nov 27, 2018 · 16 comments
Closed

Products added to a category are not shown at the frontend. #19417

addinm opened this issue Nov 27, 2018 · 16 comments
Assignees
Labels
Component: Framework/Indexer Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@addinm
Copy link

addinm commented Nov 27, 2018

Preconditions (*)

  1. Magento CE <= 2.2.6
  2. Magento Commerce Edition <= 2.2.6

Steps to reproduce (*)

  1. Run magento indexer:reindex to make all indexes up to date.
  2. Switch all indexes to the "Update Scheduled" mode.
  3. Set up Cron.
  4. Create a simple product (visible at the frontend, qty > 0)
  5. Create a category.
  6. Go to the frontend and make sure that the category is empty.
  7. Open the created category (step 4) and assign the created product to it.
  8. Save category changes.
  9. Wait until Cron reindexes category changes or run magento indexer:reindex catalog_category_product.
  10. Open the category at the frontend.

Expected result (*)

  1. Category must contain the product.

Actual result (*)

  1. The category is still empty

The problem

It looks like the category uses the information from the 'catalogsearch_fulltext' index because running magento indexer:reindex catalogsearch_fulltext solves the issue.

The solution

The solution is simple: track changes in the "catalog_category_product" table and update the "catalogsearch_fulltext_cl" changelog table.

This can be done by adding an additional subscriber:
<table name="catalog_category_product" entity_column="product_id" />
to the vendor/magento/module-catalog-search/etc/mview.xml file.

So the updated file should look this way:

<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Mview/etc/mview.xsd">
    <view id="catalogsearch_fulltext" class="\Magento\CatalogSearch\Model\Indexer\Mview\Action" group="indexer">
        <subscriptions>
            <table name="catalog_product_entity" entity_column="entity_id" />
            <table name="catalog_product_entity_int" entity_column="entity_id" />
            <table name="catalog_product_entity_decimal" entity_column="entity_id" />
            <table name="catalog_product_entity_text" entity_column="entity_id" />
            <table name="catalog_product_entity_varchar" entity_column="entity_id" />
            <table name="catalog_product_entity_datetime" entity_column="entity_id" />
            <table name="catalog_product_website" entity_column="product_id" />
            <table name="cataloginventory_stock_item" entity_column="product_id" />
            <table name="catalog_product_bundle_selection" entity_column="parent_product_id" />
            <table name="catalog_product_super_link" entity_column="product_id" />
            <table name="catalog_product_link" entity_column="product_id" />
            <table name="catalog_category_product" entity_column="product_id" />
        </subscriptions>
    </view>
</config>
@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Nov 27, 2018

Hi @addinm. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

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

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me $VERSION instance

where $VERSION is version tags (starting from 2.2.0+) or develop branches (for example: 2.3-develop).
For more details, please, review the Magento Contributor Assistant documentation.

@addinm do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Nov 27, 2018
@ghost ghost self-assigned this Nov 27, 2018
@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Nov 27, 2018

Hi @engcom-backlog-andrii. 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.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.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. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

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

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

@hostep
Copy link
Contributor

hostep commented Nov 27, 2018

I was reading the unpublished release notes for Magento 2.2.7 yesterday, and they seem to mention a fix in there which sound very similar to this bug report:

You can now see category changes on the storefront as expected after the changes have been saved. Previously, Magento did not display changes to product categories on the storefront until reindexing occurred even if update on schedule was set and the cache had been cleaned.

Maybe best to re-test your bug when Magento 2.2.7 gets released tomorrow?

@ghost ghost added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Component: Framework/Indexer Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Nov 27, 2018
@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Nov 27, 2018
@magento-engcom-team
Copy link
Contributor

@engcom-backlog-andrii Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-96667, MAGETWO-96668 were created

@ghost ghost removed their assignment Nov 27, 2018
@addinm
Copy link
Author

addinm commented Nov 27, 2018

@hostep Thank you for the information, I'll re-check this on 2.2.7 tomorrow.

@larsroettig
Copy link
Member

larsroettig commented Nov 28, 2018

@addinm any news it still reproducible?

@addinm
Copy link
Author

addinm commented Nov 30, 2018

@larsroettig Yes, the issue still exists.

@mahesh-rajawat mahesh-rajawat self-assigned this Dec 6, 2018
@magento-engcom-team
Copy link
Contributor

Hi @maheshWebkul721. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:

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

  • 2. Verify that the issue is reproducible on 2.3-develop branch

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

  • 3. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 4. If the issue is not relevant or is not reproducible any more, feel free to close it.

mahesh-rajawat added a commit to mahesh-rajawat/magento2 that referenced this issue Dec 12, 2018
@ravi-chandra3197 ravi-chandra3197 self-assigned this Feb 4, 2019
@magento-engcom-team
Copy link
Contributor

Hi @ravi-chandra3197. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

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

  • 2. Verify that the issue is reproducible on 2.3-develop branch

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

  • 3. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 4. If the issue is not relevant or is not reproducible any more, feel free to close it.

@ravi-chandra3197
Copy link
Contributor

@magento-engcom-team give me 2.2-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @ravi-chandra3197. Thank you for your request. I'm working on Magento 2.2-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @ravi-chandra3197, here is your Magento instance.
Admin access: https://i-19417-2-2-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

@ravi-chandra3197
Copy link
Contributor

Hello @magento-engcom-team, @addinm
the issue is not reproducible in 2.2-develop

@ravi-chandra3197 ravi-chandra3197 added the Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch label Feb 4, 2019
@Ctucker9233
Copy link

@ravi-chandra3197 then the Reproduced in 2.2.x label should be removed

@engcom-Bravo engcom-Bravo self-assigned this Sep 18, 2019
@m2-assistant
Copy link

m2-assistant bot commented Sep 18, 2019

Hi @engcom-Bravo. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

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

  • 2. Verify that the issue is reproducible on 2.3-develop branch

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

  • 3. If the issue is not relevant or is not reproducible any more, feel free to close it.


@engcom-Bravo
Copy link
Contributor

Hello @addinm

Thank you for contribution and collaboration!

We are not able to reproduce this issue on the lates 2.3-develop branch by provided steps.

We are closing this issue due to branch 2.2-develop was closed and Magento no longer accepts pull requests and issues to the v2.2 release lines to focus all development efforts on v2.3.
See Accepted pull requests and ported code for more details

If you still faced this issue on 2.3 please create a new Issue with all required details according to Issue reporting guidelines

@engcom-Bravo engcom-Bravo removed their assignment Sep 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Framework/Indexer Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

8 participants