bin/magento setup:upgrade
Cache cleared successfully
File system cleanup:
/home/ccarnell/Sites/xx-uk2/generated/code/Amasty
/home/ccarnell/Sites/xx-uk2/generated/code/Bazaarvoice
/home/ccarnell/Sites/xx-uk2/generated/code/Composer
/home/ccarnell/Sites/xx-uk2/generated/code/MSP
/home/ccarnell/Sites/xx-uk2/generated/code/Magento
/home/ccarnell/Sites/xx-uk2/generated/code/Migration
/home/ccarnell/Sites/xx-uk2/generated/code/Mirasvit
/home/ccarnell/Sites/xx-uk2/generated/code/Symfony
/home/ccarnell/Sites/xx-uk2/generated/code/VaxLtd
The directory '/xx-uk2/generated/metadata/' doesn't exist - skipping cleanup
Updating modules:
Schema creation/updates:
Cannot process definition to array for type enum
Hi @craigcarnell. 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.
@craigcarnell do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
Hi @engcom-backlog-andrii. 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.[x] 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.
/home/ccarnell/Sites/xx-uk2/generated/code/Amasty
/home/ccarnell/Sites/xx-uk2/generated/code/Bazaarvoice
...
/home/ccarnell/Sites/xx-uk2/generated/code/Mirasvit
@craigcarnell does not look like you have a vanilla Magento 2 instance :)
I doubt "Cannot process definition to array for type enum" is enough information for investigation, can you provide an isolated case for a clean Magento installation maybe?
@orlangur Perhaps the error reporting in Magento logs should be improved? They don't provide enough information.
Hi @craigcarnell. I'm not able to reproduce following steps you described.
Thanks for the report.
@craigcarnell probably yes. Did you post the full log? So, it does not say in which extension the problem occurs?
Did you bother to update all third-party extensions to 2.3.x compatible version or disabled them?
@orlangur
This is what i've debugged so far:
Cannot process definition to array for type enum
vendor/magento/framework/Setup/Declaration/Schema/Db/DefinitionAggregator.php
line 58
(
[name] => scope
[default] =>
[type] => enum
[nullable] => 1
[definition] => enum('global','website','group','view')
[extra] =>
[comment] =>
)
How am I supposed to debug which extension?
@craigcarnell cannot look into the code at the moment.
As this is a definition aggregator, you need to find out which particular definition is causing trouble. Each definition comes from a concrete extension.
@orlangur I've now disabled all our own custom modules and all those we have supplied by external companies in config.php. Cleared cache. Same issue.
Cannot process definition to array for type enum Array
(
[name] => scope
[default] =>
[type] => enum
[nullable] => 1
[definition] => enum('global','website','group','view')
[extra] =>
[comment] =>
)
However, I disabled this module in config.php ??
@orlangur Certainly is this module, not Magento. Will bring it up with them for now. Thanks.
Similar error encountered on aurora dump to mysql rds aws.
magento2 2.3 error at setup upgrade:
(
[name] => Column_priv
[default] =>
[type] => set
[nullable] => 0
[definition] => set('Select','Insert','Update','References')
[extra] =>
[comment] =>
)
Cannot process definition to array for type set
Column_priv
is an aws generate table.
In order to reproduce/debug the erorr, I've added an xdebug_break()
before the throw exception on \Magento\Framework\Setup\Declaration\Schema\Db\DefinitionAggregator::fromDefinition.
This way I was able to Xdebug and see the module that was causing the problem...
You may need to change the column types to text or varchar until someone create a DbDefinitionProcessor in vendor/magento/framework/Setup/Declaration/Schema/Db/MySQL/Definition/Columns.
I still don't know how this can impact modules with enum, tinytext, time, mediumtext, and other types.
For all coming here from google as me - this issue is caused by some custom modules.
Disabling (or even removing) module wouldn't work. It's issue with an existing table in database, not the code. You have to change column type in database.
The issue here is that magento2 is unable to handle certain types encountered in the database.
Like in my case, some external table to magento created by aws. This is still linked to magento2 as there should be a mechanism to simply discard the table/column in question or just throw a warning instead of a critical error like it is the case today.
In my case the issue was caused by the "pma__tracking" table created by PhpMyAdmin (in a local installation). I had to delete those pma__xxx tables to be able to complete the setup:upgrade. Definitely a Magento bug IMHO.
At least the log must be improved.
To debug the faulty column, you can add var_dump
in /vendor/magento/framework/Setup/Declaration/Schema/Db/DefinitionAggregator.php
as below
It will show you the incorrect column, so you can fix that column.
@orlangur, @engcom-backlog-tomash if magento isn't going to support a standard database column type, or any other standard of the softwares it uses, it should be documented, preferably well.
no one is going to remember/find years old conversations about the enum column type or why magento barfs on it. https://github.com/magento/magento2/issues/9883
the documentation should also be changed to say -- that it is NOT fully compatible with maria/mysql/whatever. because, in this example, erring on the datatype IS breaking compatibility. which sorta makes it a magento bug while magento is declaring itself compatible.
Hello everyone - this isn't limited to tables created by extensions this is also an issue if you have other tables sharing your M2 database - it is as if Magento goes through every table in the database regardless of whether it is associated with Magento2/an extension or not!
So for example if you had a wordpress installation in the same db as Magento I am confident this process will look through the wordpress tables.
Seems to me this issue was closed without a resolution. Isn't the fix here to add a definition processor for the unsupported data types (enum, tinytext, etc.)? I agree with @dan-ding that this is an issue with Magento not fully supporting MySQL.
Why this issue was closed even not solved ? Why error message does not give profile file or table name to fix ? I downloaded latest version today and faced that error.
what in the a**...??
why is this closed @craigcarnell ?
its just closed in the other issue as well
this is your damn bug.
enum
type columnits ridiculous that it reads whole DB on setup:upgrade.
WHY?
i created audit table, because, guess what, theres smth buggy with magento and i needed to find exactly what changed so i could retrieve the values before i fix that bs.
and now IT BREAKS BECAUSE IM TRYING TO FIX YOUR MESS??
i should be able to impregnate my DB with spawns of Satan for all you care.
WHY are you reading my setup on your setup? quit that and focus on fixing this.
P.S. this is also going to all our EE clients affected by this, just so theyre aware what theyre paying for
Looks like the user that closed this had their account deleted. Any one at Magento got eyes on this issue anymore or are our comments going into the ether?
heck, sry @craigcarnell , i saw ghost being out and thought you took the assignment..
lets try like this @Jimgitsit
@magento-team @ajijshekh123 @srsathish92 @vincent-le89 @pawankparmar @Usik2203 @ramesh-durairajaram @ilnytskyi @shikhamis11 @sergiy-v @viktym @sdzhepa
hopefully thats enough
I had this message:
Cannot process definition to array for type bit
This is a new table that I created on Magento.
And my solutions was change data type to column, from bit to int.
Now, the command work correctly! bin/magento setup:upgrade
Most helpful comment
@orlangur Perhaps the error reporting in Magento logs should be improved? They don't provide enough information.