The “Attribute_name” attribute value is empty. Set the attribute and try again or The value of attribute “is_new” must be set error may happen when you create a new configurable product or migrating from Magento 1 to Magento 2, or after you import products.
Some sample error message you may see:
- The “Is New” attribute value is empty. Set the attribute and try again
- The value of attribute “is_new” must be set
- The value of attribute price_view must be set in Magento 2
This error happens because the attribute for the product was created in the database but was not assigned properly to your new products.
Working solution
To solve this issue, we will remove the broken attribute directly from Magento 2 database.
Follow these steps:
Step 1: Use a database managing tool to edit your database
In this tutorial, I will use phpMyadmin to edit Magento 2 database’s tables and values.
If your website is running on Cpanel or Directadmin, you can find phpmyadmin in Database section. If you’re running on a dedicated server or VPS, just go to phpmyadmin page and download this software.
Now open phpmyadmin and login using database information: username and password (in case you forget, go to app/etc/env.php and find line 24, 25, 26 to retrieve db info)
'dbname' => 'magento2demo', 'username' => 'magentip.com', 'password' => 'password',
Step 2: Edit database and find the broken attribute
On the right side, look for the database of your Magento 2 store and click to see all tables in the database
Next, in table list, look for eav_attribute
table
Now find the broken attribute, for example: price
Step 3: Change value of the broken attribute
Click on edit and scroll down, find is_required
and default_value
Next, change “is required” to: 0
Uncheck default_value (null column) and also, input 0 in value column
Fnally, click on Go button in phpmyadmin page to update changes
Now the problem should be fixed.
Wrapping up
This is just a temporarily solution, I’m working to find out better solution to this issue.
If you have any trouble when fixing the issue Magento 2 attribute value is empty. Set the attribute and try again. just drop your comment below. I will try my best to help you out.