Skip to main content
added 341 characters in body
Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833

[Second degree edit] - this is actually the solution, the rest is just debugging steps I took.
Continuing the idea from the edit above, the type of the flat column filterable or searchable is determined for the customer attributes by the method Magento\Customer\Model\Indexer\AttributeProvider::getType.

[Second degree edit]
Continuing the idea from the edit above, the type of the flat column filterable or searchable is determined for the customer attributes by the method Magento\Customer\Model\Indexer\AttributeProvider::getType.

[Second degree edit] - this is actually the solution, the rest is just debugging steps I took.
Continuing the idea from the edit above, the type of the flat column filterable or searchable is determined for the customer attributes by the method Magento\Customer\Model\Indexer\AttributeProvider::getType.

added 341 characters in body
Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833

TL;DR.
I think there is a I think there is a problem with your created_in column from the customer_entity table in one of the environments. For some reason the size of the column is not taken into consideration. May be the mysql version but this is just a speculation.

[EDIT]
The above assumption was wrong.
The problem with yourappears because the attribute created_in column from theis marked as customer_entityis_filterable_in_grid = 1 tableand is_searchable_in_grid = 0 in one of the environments. For some reason the size of the column is not taken into considerationcustomer_eav_attribute table.
MayMake is_searchable_in_grid = 1 (as it should be the mysql version but this is just a speculationby default) and everything should be OK.
Make it
[/EDIT]

This is bugging me so I decided to invest a bit in it.
I debugged the createFlatTable method mentioned above and I see that for the created_in attribute comes up with type searchable even if in the indexer.xml it appears as filterable. I don't know yet why that happens. will post back when I find out why.

[Second degree edit]
Continuing the idea from the edit above, the type of the flat column filterable or searchable is determined for the customer attributes by the method Magento\Customer\Model\Indexer\AttributeProvider::getType.

protected function getType(Attribute $attribute)
{
    if ($attribute->canBeSearchableInGrid()) {
        $type = 'searchable';
    } elseif ($attribute->canBeFilterableInGrid()) {
        $type = 'filterable';
    } else {
        $type = 'virtual';
    }

    return $type;
}

In your case, you get the attribute type filterable and because this is a text attribute mysql cannot create the index on it.
Make sure your attribute is marked as is_searchable_in_grid and it will get the type searchable when the flat table is built and no index will be added to it.

TL;DR.
I think there is a problem with your created_in column from the customer_entity table in one of the environments. For some reason the size of the column is not taken into consideration.
May be the mysql version but this is just a speculation.

This is bugging me so I decided to invest a bit in it.
I debugged the createFlatTable method mentioned above and I see that for the created_in attribute comes up with type searchable even if in the indexer.xml it appears as filterable. I don't know yet why that happens. will post back when I find out why.

TL;DR.
I think there is a problem with your created_in column from the customer_entity table in one of the environments. For some reason the size of the column is not taken into consideration. May be the mysql version but this is just a speculation.

[EDIT]
The above assumption was wrong.
The problem appears because the attribute created_in is marked as is_filterable_in_grid = 1 and is_searchable_in_grid = 0 in the customer_eav_attribute table.
Make is_searchable_in_grid = 1 (as it should be by default) and everything should be OK.
Make it
[/EDIT]

This is bugging me so I decided to invest a bit in it.
I debugged the createFlatTable method mentioned above and I see that for the created_in attribute comes up with type searchable even if in the indexer.xml it appears as filterable. I don't know yet why that happens. will post back when I find out why.

[Second degree edit]
Continuing the idea from the edit above, the type of the flat column filterable or searchable is determined for the customer attributes by the method Magento\Customer\Model\Indexer\AttributeProvider::getType.

protected function getType(Attribute $attribute)
{
    if ($attribute->canBeSearchableInGrid()) {
        $type = 'searchable';
    } elseif ($attribute->canBeFilterableInGrid()) {
        $type = 'filterable';
    } else {
        $type = 'virtual';
    }

    return $type;
}

In your case, you get the attribute type filterable and because this is a text attribute mysql cannot create the index on it.
Make sure your attribute is marked as is_searchable_in_grid and it will get the type searchable when the flat table is built and no index will be added to it.

added 341 characters in body
Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833

[EDIT]

This is bugging me so I decided to invest a bit in it.
I debugged the createFlatTable method mentioned above and I see that for the created_in attribute comes up with type searchable even if in the indexer.xml it appears as filterable. I don't know yet why that happens. will post back when I find out why.

[EDIT]

This is bugging me so I decided to invest a bit in it.
I debugged the createFlatTable method mentioned above and I see that for the created_in attribute comes up with type searchable even if in the indexer.xml it appears as filterable. I don't know yet why that happens. will post back when I find out why.

Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833
Loading