magento / magento/data-migration-tool
Migrated attributes do not show in admin grids - is_visible_in_grid migration problem
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 339
- Forks
- 195
- PR merge metrics
- No merged PRs in 30d
Description
This is caused by assumptions in the interface flow of Magento 2, that failed for migrated eav.
**Starting point:**
I created some new attributes and noticed they appeared in grids by default, including "add related products". My migrated attributes did not and dammit I want them to! No admin settings combination could make my migrated attributes show.
I looked around the code for these grids, and could not find why.
I then compared the data in the database tables and found is_visible_in_grid = 1 for these new attributes and attributes created by extensions , 0 for all migrated attributes. Indeed, setting this to 1 fixed the issue.
But there is no way to set this to 1 in the admin interface.
**Why it happens:**
is_visible_in_grid is set to be invisible in the attribute management screens
On creation of an attribute, that invisible field defaults to 1. All user created attributes are therefore created with is_visible_in_grid ON
is_visible_in_grid is set to default to 0 in the database definition / all programmatically created attributes need to set it or else attributes are created with is_visible_in_grid OFF
data migration ignores that attribute, so all user created attributes end up migrated with is_visible_in_grid OFF when it should be ON.
It is not a site breaking bug but it makes the admin of products far less powerful as these attributes do not appear in product selection tables. I have pretty much only worked with data migration sites so hadn' t even realised that attributes could and should show in grids like "add related products".
**What data migration should do**
is_visible_in_grid is currently ignored as a destination.
The eav attribute configuration step should set is_visible_in_grid=1 for all user created attributes, as this is what would happen if the users created the attribute in the Magento 2 interface.
Note: i didnt look at or compare the "core" attributes yet
This migration was done end of Jan/early Feb from 1.9.3.10 to 2.3.3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the EAV attribute configuration step in the data migration flow and trace how migrated attributes are written to the database. Compare migrated user-created attributes with newly created attributes, then verify that user-created migrated attributes receive is_visible_in_grid=1 and appear in admin product grids.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100