Questions tagged [setup-upgrade]

Denotes questions regarding Magento Command-line upgrade

96 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9 votes
1 answer
2k views

setup:db:status still reports "Declarative Schema is not up to date" after update

Since an update to Magento 2.3 I am experiencing the following issue: bin/magento setup:db:status Declarative Schema is not up to date Run setup:upgrade to update your DB schema and data. Although ...
Fabian Schmengler's user avatar
6 votes
3 answers
2k views

Zero downtime deployments

I'm using Magento 2.3.4 open source and I am looking into how I can achieve zero downtime The build commands I normally use are: php bin/magento maintenance:enable composer install --no-interaction ...
Goose84's user avatar
  • 2,581
4 votes
0 answers
2k views

Magento 2 : setup:upgrade throwing error. After Magento 2.1 to 2.3 update

I recently updated my Magento version form 2.1 to 2.3.0. Update was successful in my local system. Now its throwing error while running setup:upgrade like this. Schema creation/updates: PHP Fatal ...
Shajitha Banu's user avatar
4 votes
2 answers
2k views

Magento 2: Setup Upgrade Error

In custom module, I have two grids. After installing module, When I use the upgrade command "sudo php bin/magento setup:upgrade". I got an error like this. Uncaught Magento\Framework\Exception\...
E.B's user avatar
  • 1,010
3 votes
1 answer
154 views

Syntax error or access violation: 1071 Specified key was too long when running setup:upgrade

I get the following syntax error when running setup:upgrade after the update of a specific module through composer: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; ...
IvoJongmans's user avatar
3 votes
0 answers
444 views

Upgrading to 2.2.4 and getting Call to a member function setFinalPrice()

When doing an upgrade from Magento 2.2.2 to Magento 2.2.4 I get the following when running php bin/magento setup:upgrade Cache cleared successfully File system cleanup: ..... .... ... Module '...
Goose84's user avatar
  • 2,581
2 votes
1 answer
2k views

Magento2 bin/magento setup:upgrade taking too long time to complete

I have 2 different servers and same magento243 setup in both server. and in one server setup:upgrade is completed fast but in another server it takes approx 15 minutes to complete upgrade command. ...
Sanjay Shiyal's user avatar
2 votes
0 answers
711 views

Stuck due to waiting for table metadata lock

sometimes, when i run the setup:upgrade command, magento2 stops on Magento2 Indexer (Runnign data recurring) for hours. Reading processlist under mysql server it looks like there is a problem on some ...
Francesco's user avatar
2 votes
0 answers
109 views

Preference for Magento\Setup Classes not working

TLDR - Is there a reason I can't use preference for classes in Magento\Setup namespace, specifically during the setup:upgrade processing, OR is there something I am missing with the following ...
rain2o's user avatar
  • 465
2 votes
0 answers
238 views

Upgrading from 2.2.5 to 2.2.6 several problems encrypt key exceed 32 character and layout

I'm working on upgrading my store from 2.2.5 to 2.2.6 I'm following this with my cron jobs of https://devdocs.magento.com/guides/v2.2/comp-mgr/cli/cli-upgrade.html first problem arises at php bin/...
duhh's user avatar
  • 21
2 votes
0 answers
407 views

Override class in setup:upgrade command in magento2

I am trying to override the class FilePermissions (magento/framework/Setup/FilePermissions.php) but my changes are not taken in account while I use the bin/magento setup:upgrade I tried : To add a ...
Pierre Gauthier's user avatar
2 votes
1 answer
643 views

Magento 2.2: InstallData script never called even though no entry in setup_module

Hello I have created a module in accordance to the tutorial at Magento Docs My InstallData class looks like this: <?php /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt ...
Jens's user avatar
  • 401
2 votes
1 answer
4k views

magento 2 UpgradeSchema not working

I have already created a table with name tutorial_simplenews.I want to add new column to that table.my code is below. <?php /** * Copyright © 2013-2017 Magento, Inc. All rights reserved. * See ...
Kamlesh Jha's user avatar
  • 1,058
2 votes
0 answers
182 views

magento setup:upgrade enables module

I've just created a Magento2 module, here is the module.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:...
Julien Lachal's user avatar
1 vote
2 answers
934 views

Magento 2 setup upgrade throwing error . After version upgraded from 2.3.6-p1 to 2.4.5-p1

I got following error while running upgrade command Warning: Undefined array key "inventory_source" in /var/www/html/vendor/magento/framework/Setup/Declaration/Schema/Db/SchemaBuilder.php on ...
Jaisa's user avatar
  • 2,596
1 vote
1 answer
983 views

Running php bin/magento setup:upgrade caused magento 2 app to crash

I originally was facing an issue of not being able to save any configurations on my magento application, and a user on this site recommended to run the php bin/magento setup:upgrade command as the ...
Slippy's user avatar
  • 11
1 vote
1 answer
198 views

php bin/magento setup:upgrade SHOW ERROR : Connection "default" is not defined

Setup upgrade command not running. The issue is given below in screenshot.
Alok Tiwari's user avatar
1 vote
0 answers
930 views

Error - Database 'DB_Name' does not exist or specified database server user does not have privileges to access this database magento 2

I am facing an error after upgrading Magento 2.3.6 to Magento 2.4.4-beta4 version. Error - Database 'DB_Name' does not exist or specified database server user does not have privileges to access this ...
Hitesh Balpande's user avatar
1 vote
2 answers
459 views

unable To Complete Command setup:di:compile

unable to run command php bin/magento setup:di:compile Showing Following error. Please Tell me 1/9 [==>------------------] 11% 1 sec 131.0 MiBClass 'Liquid\AbstractBlock' not found#0 /home/737540....
Faraz Bashir's user avatar
1 vote
1 answer
783 views

Magento 2 upgrade - Setup:upgrade stuck at Magento_Customer

I am trying to upgrade Magento 2.2.1 to Magento 2.4.3-p1 using composer and successfully new version upgrade but when run upgrade command but process stuck not progress process of from Data install/...
Bhavesh Godhani's user avatar
1 vote
0 answers
186 views

Class Magento\Framework\Mview\TriggerCleaner does not exist on running setup:upgrade error occurs on Magento 2

On running setup:upgrade error occurs and setup upgrade not started Class Magento\Framework\Mview\TriggerCleaner does not exist on di:compile this error occur In ClassReader.php line 43: ...
Prits's user avatar
  • 626
1 vote
1 answer
351 views

From upgrading Magento 2.3 to 2.4 setup upgrade command is struck

I have updated my Magento from version 2.3 to 2.4. But when i hit bin/magento setup:upgrade it will running from around 1 hr. When i check show processlist a command is running SELECT `...
Prits's user avatar
  • 626
1 vote
1 answer
576 views

Topic "inventory.source.items.cleanup" is not configured

I try to upgrade my magento 2 but i got this problem, how can i solve ? thanks
Trường Oggy's user avatar
1 vote
0 answers
318 views

Magento 2.3 - setup:upgrade Schema creation/updates error in DefinitionAggregator.php

I am trying to setup:upgrade but its giving me this error Undefined index: version in /var/www/html/vendor/magento/framework/Setup/Declaration/Schema/Db/DefinitionAggregator.php on line 91 I am not ...
Sanjeev Hegde's user avatar
1 vote
1 answer
833 views

Unique constraint violation found - Unable to save new cookie on bin/magento s:up

I just recently switched over to mac for work and am working on getting my local environment set up. Everything's been going much more smoothly than on my PC with Virtualbox, but when I go running bin/...
Terence Patane-Ronan's user avatar
1 vote
1 answer
126 views

Setup:upgrade error after upgrade to Magento 2.3.3

I just upgrade my Magento 2.2.5 to 2.3.3 , and After running bin/magento setup:upgrade i got the following error: Warning: Illegal string offset 'max_items' in vendor/magento/framework/App/Config/...
jojo's user avatar
  • 179
1 vote
0 answers
75 views

Magento 2.3.3 Duplicate entry '15-Images' after upgrade

I'm currently trying to upgrade data and one of my modules is throwing an obscure error about duplicated entry eav_attribute_group when I'm trying to install some product attribute, I have installed ...
Shalev's user avatar
  • 21
1 vote
0 answers
129 views

When try to use bin/magento setup:upgrade Getting Error

PHP Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Framework\Setup\Declaration\Schema\Diff\SchemaDiff::diff()must be an instance of Magento\Framework\Setup\Declaration\Schema\Dto\...
Vivek's user avatar
  • 168
1 vote
0 answers
155 views

Cannot process definition to array for type json after updating magento 2.2.3 to 2.3.3

I am upgrading magento 2.2.3 to 2.3.3 via command line after running this command php bin/magento setup:upgrade but I am getting this error: Cannot process definition to array for type json what ...
MohsenP's user avatar
  • 11
1 vote
1 answer
572 views

Unable to apply data patch: elasticsearch6

Unable to apply data patch Magento\CatalogSearch\Setup\Patch\Data\SetInitialSearchWeightForAttributes for module Magento_CatalogSearch. Original exception message: Indexer handler is not available: ...
LucasMaliszewski's user avatar
1 vote
0 answers
45 views

Upgrading Magento and missing files

If I do the following php bin/magento maintenance:enable composer require magento/product-community-edition 2.3.3 --no-update composer update rm -rf var/di var/generation php bin/magento cache:flush ...
Goose84's user avatar
  • 2,581
1 vote
1 answer
37 views

Cron script error on readness check

> Check Cron Scripts Cron script readiness check failed. Hide detail > > Error from Updater Application Cron Script: > > Found non-writable path(s): /var/www/html/pub/media/.htaccess &...
Ed Tan's user avatar
  • 173
1 vote
0 answers
185 views

Magento upgrade from 2.2.3 to 2.3.0 just blew Cheeze balls .. help

just finshed updating composer update, bin/magento setup:upgrade Cache cleared successfully File system cleanup: /home/pricesplitters/public_html/generated/code/Composer /home/pricesplitters/...
william Jensen's user avatar
1 vote
0 answers
275 views

Error after removing database Prefix

I am in the process of upgrading our Magento 2.2.5 website to version 2.3. I have managed to do this and the website works fine, as far as I can tell. However, we have a third party extension for a ...
user73594's user avatar
1 vote
0 answers
1k views

Magento 2 : Upgrade Data Version of custom module using setup:db-data:upgrade

I created a custom module which has below UpgradeData.php. <?php namespace Akhil\Database\Setup; use Magento\Framework\Setup\UpgradeDataInterface; use Magento\Framework\Setup\...
Akhil Gupta's user avatar
  • 1,946
1 vote
0 answers
88 views

Magento 2 CDN cache

I have enabled CDN for my Magento 2 store static contents. But just would like to confirm, will there be any issue , if I run the below commands? Should I rebuild the CDN cache after running ...
Intellect Outsource's user avatar
1 vote
0 answers
67 views

Area Code not set when Model is used while using Upgrade Data Script

I have following code in UpgradeData.php protected $test; public function __construct( \Vendor\ModuleName\Model\Test $test ) { $this->test = $test; } public function ...
Nausif's user avatar
  • 1,534
1 vote
0 answers
340 views

Magento 2 : UpgradeSchema write mysql trigger

I am trying to add mysql trigger using the upgradeschema in magento 2 but I am getting the "Cannot execute multiple queries". Below is my trigger DELIMITER $$ CREATE TRIGGER ...
manish_khot's user avatar
1 vote
1 answer
513 views

Web Setup Wizard Error

In the admin panel, the normal Web Setup Wizard page is not showing. But there is no error in the front end. What might be the cause of this?
Dean's user avatar
  • 125
1 vote
1 answer
1k views

Magento 2 foreign key

Hey i need to setup the install shema of my module with 2 table and a third table thatmake the link between the two. First table have id_provider the second id_company i want my third have the wo id....
Jeremie CIESLARCZYK's user avatar
1 vote
0 answers
222 views

uncaught error class magento/indexer/model/config/reader

I have been facing this issue since ui upgraded my magento site form 2.0.7 to 2.1.5. When trying to run magento setup:upgarde command to install extension it gives uncaught error class magento/indexer/...
shivika's user avatar
  • 11
1 vote
0 answers
899 views

Magento 2 - Skip installing a module during setup:upgrade

Is there a way that not to install a module during setup:upgrade? We have several modules that are not in use but want to keep it in the source such that we can enable it again on-demand.
TFS's user avatar
  • 4,309
1 vote
3 answers
154 views

Error while setup upgrade magento 2.0.7?

sudo rm -rf pub/static/* sudo php bin/magento setup:upgrade I have set 777 permission to pub but still getting [Exception] : ...
coder's user avatar
  • 639
0 votes
0 answers
29 views

Magento 2.4.4 - Magento modules inside the vendor folder don't work

I'm trying to run the "setup:upgrade" command to register all magento modules but this error is presented: "PHP Fatal error: Uncaught Error: Class Magento\Framework\Component\...
Jackom's user avatar
  • 473
0 votes
1 answer
261 views

Interceptor not exists issue when running setup:upgrade command in magento 2

When i run setup upgrade command i got the following error Class "Vendor_Name\Subscription\Test\Command\DispatchEventOOSProduct\Interceptor" does not exist I tried to remove the ...
Jaisa's user avatar
  • 2,596
0 votes
1 answer
656 views

Deprecated Functionality: rawurlencode(): Passing null to parameter #1 ($string) of type string is deprecated s

I upgraded the magento version from 2.3.6-p1 to 2.4.5-p1 enterprise edition. When I run bin/magento setup:upgrade command throws following error. Deprecated Functionality: rawurlencode(): Passing null ...
Jaisa's user avatar
  • 2,596
0 votes
1 answer
273 views

How to convert old script to declarative schema / data patch without breaking any data?

I have a module (v1.0.1) with an InstallSchema to create a table and an InstallData to create a product attribute. Now I want to update the module (v1.0.2) to convert the InstallSchema to the ...
MagePsycho's user avatar
  • 4,712
0 votes
2 answers
255 views

Could not validate a connection to Elasticsearch. No alive nodes found in your cluster after Setup Upgrade

I have upgraded magento to 2.4.5 and when i ran setup upgrade command I received this error "Could not validate a connection to Elasticsearch. No alive nodes found in your cluster". Elastic ...
Ralph Rhodes's user avatar
0 votes
1 answer
719 views

Magento 2 - can't add foreign key constraint with declarative schema (db_schema.xml) - Reference column X in reference table Y do not have index

I try to add this table: MODULE/etc/db_schema.xml: <?xml version="1.0"?> <schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="...
Black's user avatar
  • 3,280
0 votes
1 answer
242 views

Magento 2 Default category shows on menu even though I have "Include in Menu" disabled

Ever since I did a setup:upgrade I've been having some issues with the Admin not doing what it's supposed to do, particularly on the Catalog > Categories section. As you can see, on the backend I'...
Abi's user avatar
  • 33