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

Missing products from category after upgrade to 2.3.10 #572

Closed
srenon opened this issue Oct 18, 2017 · 7 comments
Closed

Missing products from category after upgrade to 2.3.10 #572

srenon opened this issue Oct 18, 2017 · 7 comments

Comments

@srenon
Copy link

srenon commented Oct 18, 2017

Preconditions

Magento Version : 2.1.9

ElasticSuite Version : 2.3.10

Please take a look at my comment on #567

This code will remove any product that does not have a status. Before upgrading, I have 5 products after upgrading I have only one showing up.

      foreach ($childrenIndexData as $childrenId => $childrenData) {
            $enabled = isset($childrenData['status']) && current($childrenData['status']) == 1;
            if ($enabled === false) {
                unset($childrenIndexData[$childrenId]);
            }
        }
@afoucret
Copy link
Contributor

Since 2.3.8, we decided that all composite products with no active simple children should not be indexed.

Can you please check that the missing products :

  1. Are composite (configurable, grouped or bundle)
  2. Have no active simple children (I suspect this happen because of one of your previous post)

In this case it does not make sense to display them and the behavior is expected.

@srenon
Copy link
Author

srenon commented Oct 19, 2017

I created a new product in our existing store and also an in a fresh test installation (same exact product setup and version)

Existing store print_r(childrenData)

Array
(
    [product_size] => Array
        (
            [0] => 573
        )

    [option_text_product_size] => Array
        (
            [0] => L
        )

    [name] => Array
        (
            [0] => Product 1
        )

)

fresh test installation store

Array
(
    [name] => Array
        (
            [0] => Test product-Gray
        )

    [color] => Array
        (
            [0] => 52
        )

    [option_text_color] => Array
        (
            [0] => Gray
        )

    [status] => Array
        (
            [0] => 1
        )

    [option_text_status] => Array
        (
            [0] => Enabled
        )

    [tax_class_id] => Array
        (
            [0] => 2
        )

    [option_text_tax_class_id] => Array
        (
            [0] => Taxable Goods
        )

)

@afoucret
Copy link
Contributor

Your first example product does not have a status. For me it is equivalent to being disabled.
So I think the behavior is the expected one.

@srenon
Copy link
Author

srenon commented Oct 19, 2017

Since I'm at least the second person with this issue (#565), could we check to see if the key exist and if so do new the logic else do nothing?

@srenon
Copy link
Author

srenon commented Oct 19, 2017

I have zero configurable showing on the site after upgrading from 2.3.5 and they should be over 500+

@afoucret
Copy link
Contributor

I think it would be better to fix the problem at source : status is a mandatory field for products. Having it missing can lead to other problems elsewhere in your Magento install or with other extensions.

@srenon
Copy link
Author

srenon commented Oct 19, 2017

@afoucret

The issue is caused by someone changing the default "Use in Search" from "yes" to "no"

image

SELECT `main_table`.`entity_type_id`, `main_table`.`attribute_code`, `main_table`.`attribute_model`, `main_table`.`backend_model`, `main_table`.`backend_type`, `main_table`.`backend_table`, `main_table`.`frontend_model`, `main_table`.`frontend_input`, `main_table`.`frontend_label`, `main_table`.`frontend_class`, `main_table`.`source_model`, `main_table`.`is_required`, `main_table`.`is_user_defined`, `main_table`.`default_value`, `main_table`.`is_unique`, `main_table`.`note`, `additional_table`.* FROM `eav_attribute` AS `main_table`
 INNER JOIN `catalog_eav_attribute` AS `additional_table` ON additional_table.attribute_id = main_table.attribute_id WHERE (main_table.entity_type_id = 4) AND (is_searchable = 1 OR is_visible_in_advanced_search = 1 OR is_filterable > 0 OR is_filterable_in_search = 1 OR is_used_for_promo_rules = 1 OR used_for_sort_by = 1) AND (is_searchable = 1 OR is_visible_in_advanced_search = 1 OR is_filterable > 0 OR is_filterable_in_search = 1 OR is_used_for_promo_rules = 1 OR used_for_sort_by = 1) AND (is_searchable = 1 OR is_visible_in_advanced_search = 1 OR is_filterable > 0 OR is_filterable_in_search = 1 OR is_used_for_promo_rules = 1 OR used_for_sort_by = 1) AND (is_searchable = 1 OR is_visible_in_advanced_search = 1 OR is_filterable > 0 OR is_filterable_in_search = 1 OR is_used_for_promo_rules = 1 OR used_for_sort_by = 1)

@srenon srenon closed this as completed Oct 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants