35

You are getting this error because "data type" of any third-party extension's table's column is tinytext. Note: Normally this error happens because of Fishpig Wordpress extension's wp_comment table has tinytext data type So you need to find out the column name using debug in the following file. Open this file /vendor/magento/framework/Setup/Declaration/...


25

The command setup:di:compile command generates the contents of the var/di folder in Magento <2.2 and generated for Magento >= 2.2 According to Magento, this serves the following purpose: Application code generation (factories, proxies, and so on) Area configuration aggregation (that is, optimized dependency injection configurations per area) ...


14

The fix for the issue - Type Error occurred when creating the object: Magento\Framework\Locale\Resolver is not modifying the core class at all. We need to understand the cause of it first. Modifying the core class is not recommended at all. The issue is not with the class vendor/magento/framework/Encryption/Adapter/SodiumChachaIetf.php ⚠️ But the issue ...


13

It's not mandatory to run setup:di:compile command everytime but if you have done any code change specially with factory methods ,proxy, add plugins or any code compilation then you must need to run this command. More Details magento setup:di:compile in order to generate necessary files. Both options ends up with generating classes in MAGENTO_ROOT/var/...


13

Solution 1: You should delete attribute code dimension in eav_attribute table and recreate use 'input' => 'text' in array. After then, reindex + clear cache. [ 'type' => 'decimal', 'backend' => '', 'frontend' => '', 'label' => 'Dimension', 'input' => 'text', 'class' => '', 'source' => '', 'global' =>...


11

This will happen in normal cases. Go to, app/etc/env.php Change 'host' => 'localhost', Into 'host' => '127.0.0.1' Run the upgrade now. Good Luck!


11

In my case, Wordpress was being used with the Fishpig integration. In wp_comments, the comment_author was set to TINYTEXT. The problem was resolved by changing that column declaration.


11

You are getting this error because "data type" of any third party extension's table column is enum. So you need to find out column name using debug in following file. See below file /vendor/magento/framework/Setup/Declaration/Schema/Db/DefinitionAggregator.php and check this fromDefinition() and add debug code to find column name. public function ...


10

Here are the upgrade steps as I understand them: For all active modules $ bin/magento setup:upgrade checks the configured (module.xml file) version versus the database (setup_module table) schema+data values [1] Differences between configured version and database version trigger execution of UpgradeSchema->upgrade() and then UpgradeData->upgrade() for ...


9

No need to update in core files, please follow up my solution. Open Mysql database and select database and use below queries. This query also will be useful to find out the datatype CHAR error when upgrade to Magento 2.3. SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE DATA_TYPE ='enum'; Then the table will be list, after that you have to update the ...


7

This can happen if you have multiple versions of PHP on your system. For example, I had /usr/bin/php as well as the PHP from MAMP on my Mac, so running /usr/bin/php in the (cron job for indexing) http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-cron.html#config-cli-cron-bkg would give the error shown in the question. To ...


6

Yes, we can create new table using UpgradeSchema.php. Inside public function upgrade() add below scripts: $setup->startSetup(); if (version_compare($context->getVersion(), '2.0.0', '<=')) { $installer = $setup; $installer->startSetup(); $table = $installer->getConnection() ->newTable($installer->getTable('...


6

Duplicate of Template name comes from the module-email So setup:upgrade tries to add e-mail templates that already exist. Remove any non altered templates from the database.


5

Take a look: vendor/magento/framework/DB/Ddl/Table.php::addColumn(), we can see the arguments of addColumn method: public function addColumn($name, $type, $size = null, $options = [], $comment = null) string $name the column name - 1st argument. string $type the column data type - 2nd argument. string | int | array $size the column length - 3rd argument. ...


5

Run: bin/magento setup:upgrade Probably the issue is on database, so open the table setup_module and complete the module that doesn't have data_version completed.


5

First you can use this command for compiling di php bin/magento setup:di:compile After finish of compilation if not getting any error delete di folder from /var/www/html/Magento/var/ and then run setup upgrade.


5

We can use \Magento\Framework\DB\Ddl\TriggerFactory to create mysql triggers through setup script: (not test yet) class UpgradeSchema implements UpgradeSchemaInterface { /** * @var \Magento\Framework\DB\Ddl\TriggerFactory */ protected $triggerFactory; public function __construct( \Magento\Framework\DB\Ddl\TriggerFactory $...


5

I've found this from online sources: The recurring scripts are executed after any module setup. If a module needs to do something everytime other modules are installed it can do it via the recurring script. In Magento2 you can check in Magento\Indexer\Setup\Recurring class where Magento_Indexer module checks for new defined indexers and adds them to ...


5

If you do WordPress migrations frequently, changing the schema as suggested in some of the other answers is tedious and easy to forget, plus changing the schema seems hacky. To resolve this, I wrote a small plugin (Interceptor) so that Magento would ignore the WordPress Tables. Per the docs, using "Around" Interceptors is not ideal, but in this particular ...


5

As mentionned in this issue on the M2 github 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.


5

@Hitesh, when you run upgrade command it will run UpgradeData.php file and in that it will compare the version based on that version it will execute the code, Since the product creation code is not present in the current version. That will not create the product for you. Better approach is use RecurringData.php The recurring scripts are executed after ...


5

I have searched around and found this solution this is because of return $plainText SodiumChachaIetf::decrypt() must be of the type string, boolean Go to this file: vendor/magento/framework/Encryption/Adapter/SodiumChachaIetf.php And Update Below Code: $plainText = sodium_crypto_aead_chacha20poly1305_ietf_decrypt( $payload, $...


4

You cloned your Magento from Github, so all your core is in folder app/code/Magento/, you need remove it and run the composer command to have your core in the folder vendor/. Note that you shouldn't clone the repository, next time install using Composer. These are the steps that I used to fix: rm -rf var/view_preprocessed/ var/cache/ var/page_cache/ var/...


4

Hii @Devidas Please try this code $setup->startSetup(); $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]); $attributesInfo = [ 'vat_id' => [ 'label' => 'VAT number', 'type' => 'static', 'input' => 'text', 'position' => 140, ...


4

You need not to update all the Magento version from 2.3.0 to 2.3.4. You can directly upgrade your Magento store version to 2.3.4 or 2.3.5 (if available) with the below commands. php bin/magento maintenance:enable composer require magento/product-community-edition 2.3.4 --no-update //for upgrading to Magento 2.3.4 composer require magento/product-...


3

According to framework/DB/Adapter/Pdo/Mysql.php, they're the synonyms, meaning they're the same column type: protected $_ddlColumnTypes = [ Table::TYPE_BOOLEAN => 'bool', Table::TYPE_SMALLINT => 'smallint', Table::TYPE_INTEGER => 'int', Table::TYPE_BIGINT => 'bigint', Table::TYPE_FLOAT =&...


3

setup:upgrade is used whenever you have installed a new module on your system. When you run this, Magento checks the setup_module table and it compares each module's schema_version and data_version against modules existing on your site. If any of the modules have a greater version number than the one on record in the setup_module table, the appropriate ...


3

when you are installing new extension at that time you need to run a command, php bin/magento setup:upgrade if you have already run command and you can change inside a module, you don't need to run upgrade command. At that time you have to run upgrade command, when you have changed inside setup folder, for table new entry insert or delete already field ...


3

Simple, try the following commands. I have encountered this error, and I have overcome. rm -rf var/di/* rm -rf pub/static/_cache/* rm -rf pub/static/frontend/* rm -rf var/generation/* rm -rf var/cache/* rm -rf var/page_cache/* rm -rf var/view_preprocessed/* In magento 2 var/di has been replaced by generated/metadata var/generation has been replaced by ...


3

I did following way and working fine with compile. You can try. app/code/SR/Stackexchange/etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <type name="Magento\Framework\Console\CommandList"> <arguments> ...


Only top voted, non community-wiki answers of a minimum length are eligible