45
votes
Accepted
Cannot process definition to array for type tinytext in Magento 2.3.0
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 ...
- 5,284
29
votes
Accepted
Magento2 - setup:di:compile
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:
...
- 1,248
17
votes
php bin/magento setup:upgrade issue
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 ...
- 899
16
votes
Magento2 - setup:di:compile
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 ...
- 22.2k
16
votes
Accepted
Magento2.3 setup:upgrade error
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 ...
- 1,076
15
votes
Accepted
The configuration parameter "formElement" is a required for custom attribute product field
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',
'...
- 3,678
14
votes
Patch isn't working
If you have already ran setup_upgrade before, there is a table in the database called patch_list that will be filled because patches are only executed once. You could go in the database and delete the ...
- 670
13
votes
Magento 2: How to fix error `[Zend_Db_Adapter_Exception] SQLSTATE[HY000] [2002] No such file or directory` when run setup:upgrade?
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!
- 249
13
votes
Cannot process definition to array for type tinytext in Magento 2.3.0
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.
- 2,148
13
votes
Magento2.3 setup:upgrade error
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/...
- 496
11
votes
Accepted
Does Magento 2's UpgradeSchema Pattern Handle non-contiguous Version Jumps
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+...
- 16.6k
8
votes
How to solve "Duplicate Of Template Name"?
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.
8
votes
Cannot process definition to array for type tinytext in Magento 2.3.0
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 ...
- 990
7
votes
Magento 2: How to fix error `[Zend_Db_Adapter_Exception] SQLSTATE[HY000] [2002] No such file or directory` when run setup:upgrade?
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)
...
- 255
7
votes
Accepted
Magento upgrade from 2.2.3 -> 2.3 error in module-configurable-product
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 ...
- 985
7
votes
Accepted
php bin/magento setup:upgrade issue
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/...
- 1,411
6
votes
Accepted
Create new table with upgrade scripts in custom module
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', '<=')) {
...
- 717
6
votes
Accepted
Recurring.php and RecurringData.php
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 ...
- 707
6
votes
Accepted
Constraint "email_order_to_sales_order" references table that does not exist
This problem occurs when running the setup:upgrade command while having the newer Dotdigitalgroup_Enterprise module enabled and the Dotdigitalgroup_Email module disabled.
Prior to this Enterprise ...
- 76
5
votes
Accepted
What is causing InstallSchema Error Warning: array_key_exists() expects parameter 2 to be array, string given in
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 = ...
- 31.5k
5
votes
Accepted
How to solve "Duplicate Of Template Name"?
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.
- 12.4k
5
votes
Magento 2 setup:upgrade giving error
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 ...
- 2,375
5
votes
Accepted
How to create MySQL Triggers through setup script
We can use \Magento\Framework\DB\Ddl\TriggerFactory to create mysql triggers through setup script: (not test yet)
class UpgradeSchema implements UpgradeSchemaInterface
{
/**
* @var \Magento\...
- 31.5k
5
votes
Accepted
Upgradeschema.php and UpgradeData.php scenarios
@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 ...
- 1,819
5
votes
Accepted
How to create multiple customer attributes in magento 2?
Hii @Devidas Please try this code
$setup->startSetup();
$customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);
$attributesInfo = [
'vat_id' => [
...
- 1,137
5
votes
Running php bin/magento setup:upgrade stuck
please enable verbose mode or run command with strace
bin/magento setup:upgrade -vvv
and tail magento logs to see whats going on,
strace -s 99999 bin/magento setup:upgrade
see at the end whats ...
- 3,771
4
votes
Accepted
Module 'Magento_CatalogInventory' has already been defined
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'...
- 12.4k
4
votes
Accepted
Error when running bin/magento setup:upgrade after creating Module on Magento 2
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/...
- 56
4
votes
Accepted
Magento 2 - InstallData.php does not run again after first time
Delete your module from setup_module table and run php bin/magento setup:upgrade
- 254
4
votes
Prevent Magento 2 website down when running setup:upgrade
The short answer is that you cannot totally avoid having the site down while doing database updates.
The key though, is to have a process in place that minimizes the downtime.
The steps below are ...
- 2,104
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
setup-upgrade × 196magento2 × 134
database × 26
magento2.3 × 25
upgrade × 20
magento-upgrade × 15
magento-2.1 × 12
module × 12
setup-di-compile × 12
static-content-deploy × 10
magento2.2 × 9
cli × 9
upgradeschema × 9
magento2.4 × 8
error × 7
installation × 5
composer × 5
magento2.3.3 × 5
elasticsearch × 5
command-line × 5
magento2.3.4 × 4
server-setup × 4
install-script × 4
setup-script × 4
sample-data × 4