php bin/magento setup:upgrade stepHere is the exception thrown:
Module 'Magento_ConfigurableProduct':
PHP Fatal error: Uncaught TypeError: explode() expects parameter 2 to be string, boolean given in /var/www/devsite/vendor/magento/module-configurable-product/Setup/Patch/Data/UpdateManufacturerAttribute.php:55
Stack trace:
#0 /var/www/devsite/vendor/magento/module-configurable-product/Setup/Patch/Data/UpdateManufacturerAttribute.php(55): explode(',', false)
#1 /var/www/devsite/vendor/magento/framework/Setup/Patch/PatchApplier.php(162): Magento\ConfigurableProduct\Setup\Patch\Data\UpdateManufacturerAttribute->apply()
#2 /var/www/devsite/setup/src/Magento/Setup/Model/Installer.php(1002): Magento\Framework\Setup\Patch\PatchApplier->applyDataPatch('Magento_Configu...')
#3 /var/www/devsite/setup/src/Magento/Setup/Model/Installer.php(874): Magento\Setup\Model\Installer->handleDBSchemaData(Object(Magento\Setup\Module\DataSetup), 'data', Array)
#4 /var/www/devsite/setup/src/Magento/Setup/Console/Command/UpgradeCommand.php(123): Magento\Setup\Model\Installer->installDataFixtures(Array)
#5 /var/www/devsite/vendor/symfony/console/Comman in /var/www/devsite/vendor/magento/module-configurable-product/Setup/Patch/Data/UpdateManufacturerAttribute.php on line 55
I am trying to upgrade a Magento 2.2.2 site to 2.3.
Hi @Yamaha32088. Thank you for your report.
To help us process this issue please make sure that you provided the following information:
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.
@Yamaha32088 do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
Hi @milindsingh. 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: :point_down:
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 branchDetails
- 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.
@Yamaha32088 Magento 2.3 is not compatible with PHP 7.3.
Kindly check the system requirements in devdocs.
https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html
@milindsingh That was a typo I meant to say PHP 7.2
@milindsingh @engcom-backlog-nazar please reopen this issue
@Yamaha32088 i'm will retest
@Yamaha32088. Search in the database in table _eav_attribute_ for attribute manufacturer and copy the ID. With this id search in _catalog_eav_attribute_. Now enter the following in column _apply_to_
simple, virtual, bundle, downloadable, configurable
Now setup:upgrade is working.
I was trying to upgrade the Magento from 2.1 to 2.3, the @JoostWan solution solved the problem for me.
The manufacturer row was missing in eav_attribute in our installation so we did the following:
`
INSERT INTO 'eav_attribute' ('attribute_id', 'entity_type_id', 'attribute_code', 'attribute_model', 'backend_model', 'backend_type', 'backend_table', 'frontend_model', 'frontend_input', 'frontend_label', 'frontend_class', 'source_model', 'is_required', 'is_user_defined', 'default_value', 'is_unique', 'note') VALUES (NULL, '4', 'manufacturer', NULL, NULL, 'varchar', NULL, NULL, 'text', 'Manufacturer', 'validate-length maximum-length-255', NULL, '0', '0', NULL, '0', NULL);
INSERT INTO catalog_eav_attribute (attribute_id, is_global, is_visible, is_searchable, is_filterable, is_comparable, is_visible_on_front, is_html_allowed_on_front, is_used_for_price_rules, is_filterable_in_search, used_in_product_listing, used_for_sort_by, apply_to, is_visible_in_advanced_search, position, is_wysiwyg_enabled, is_used_for_promo_rules, is_required_in_admin_store, is_used_in_grid, is_visible_in_grid, is_filterable_in_grid, search_weight, additional_data)
SELECT attribute_id , 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, "simple, virtual, bundle, downloadable, configurable", 1, 0, 0, 0, 0, 0, 0, 0, 1, NULL FROM eav_attribute WHERE attribute_code = 'manufacturer' AND entity_type_id = 4
`
(based on https://magento.stackexchange.com/questions/242846/magento-2-2-6-attribute-with-id-manufacturer-does-not-exist?rq=1)
The same query as @wessel-techtribe-nl provided but with proper field/table escaping: ` instead of '
INSERT INTO `eav_attribute` (
`attribute_id`, `entity_type_id`, `attribute_code`, `attribute_model`,
`backend_model`, `backend_type`, `backend_table`, `frontend_model`,
`frontend_input`, `frontend_label`, `frontend_class`, `source_model`,
`is_required`, `is_user_defined`, `default_value`, `is_unique`, `note`
) VALUES (
NULL, '4', 'manufacturer', NULL, NULL, 'varchar', NULL, NULL, 'text',
'Manufacturer', 'validate-length maximum-length-255',
NULL, '0', '0', NULL, '0', NULL
);
INSERT INTO catalog_eav_attribute (
attribute_id, is_global, is_visible, is_searchable, is_filterable, is_comparable,
is_visible_on_front, is_html_allowed_on_front, is_used_for_price_rules,
is_filterable_in_search, used_in_product_listing, used_for_sort_by, apply_to,
is_visible_in_advanced_search, position, is_wysiwyg_enabled,
is_used_for_promo_rules, is_required_in_admin_store, is_used_in_grid,
is_visible_in_grid, is_filterable_in_grid, search_weight, additional_data
)
SELECT
attribute_id , 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1,
"simple, virtual, bundle, downloadable, configurable",
1, 0, 0, 0, 0, 0, 0, 0, 1, NULL
FROM eav_attribute
WHERE attribute_code = 'manufacturer' AND entity_type_id = 4;
Most helpful comment
@Yamaha32088. Search in the database in table _eav_attribute_ for attribute manufacturer and copy the ID. With this id search in _catalog_eav_attribute_. Now enter the following in column _apply_to_
simple, virtual, bundle, downloadable, configurableNow setup:upgrade is working.