0

I have a site running with Magento 2.2.1, after upgrading to 2.3.3 with this guide, running bin/magento setup:upgrade returns error: The attribute can't be deleted.

I modified core file to get the stack trace and here is it:

#0 /var/www/html/sitedir/vendor/magento/framework/Model/ResourceModel/Db/AbstractDb.php(448): Magento\Eav\Model\ResourceModel\Entity\Attribute->_beforeDelete(Object(Magento\Customer\Model\Attribute))
#1 /var/www/html/sitedir/generated/code/Magento/Eav/Model/ResourceModel/Entity/Attribute/Interceptor.php(245): Magento\Framework\Model\ResourceModel\Db\AbstractDb->delete(Object(Magento\Customer\Model\Attribute))
#2 /var/www/html/sitedir/vendor/magento/module-eav/Model/AttributeRepository.php(183): Magento\Eav\Model\ResourceModel\Entity\Attribute\Interceptor->delete(Object(Magento\Customer\Model\Attribute))
#3 /var/www/html/sitedir/vendor/vertex/module-tax/Setup/UpgradeData.php(77): Magento\Eav\Model\AttributeRepository->delete(Object(Magento\Customer\Model\Attribute))
#4 /var/www/html/sitedir/vendor/vertex/module-tax/Setup/UpgradeData.php(58): Vertex\Tax\Setup\UpgradeData->deleteCustomAttribute()
#5 /var/www/html/sitedir/setup/src/Magento/Setup/Model/Installer.php(988): Vertex\Tax\Setup\UpgradeData->upgrade(Object(Magento\Setup\Module\DataSetup), Object(Magento\Setup\Model\ModuleContext))
#6 /var/www/html/sitedir/setup/src/Magento/Setup/Model/Installer.php(875): Magento\Setup\Model\Installer->handleDBSchemaData(Object(Magento\Setup\Module\DataSetup), 'data', Array)
#7 /var/www/html/sitedir/setup/src/Magento/Setup/Console/Command/UpgradeCommand.php(123): Magento\Setup\Model\Installer->installDataFixtures(Array)
#8 /var/www/html/sitedir/vendor/symfony/console/Command/Command.php(255): Magento\Setup\Console\Command\UpgradeCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/html/sitedir/vendor/symfony/console/Application.php(893): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/html/sitedir/vendor/symfony/console/Application.php(262): Symfony\Component\Console\Application->doRunCommand(Object(Magento\Setup\Console\Command\UpgradeCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/html/sitedir/vendor/magento/framework/Console/Cli.php(105): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/html/sitedir/vendor/symfony/console/Application.php(145): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/html/sitedir/bin/magento(23): Symfony\Component\Console\Application->run()
#14 {main}

How to fix this problems?

0

There might be some problems with Vertex Tax module afer upgrading. I disable it and bin/magento setup:upgrade can then run normally.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.