-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to Update Magento Error in SchemaBuilder.php at line: 253 #38592
Comments
Hi @nomis11uk. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Hi @engcom-Dash. Thank you for working on this issue.
|
I also encountered this error when attempting to upgrade 2.4.6-p4 to 2.4.7. |
Hello , I encountered the same error while fresh installing Magento 2.4.7 community edition on Centos 7 with Apache 2.4, PHP 8.2/8.3 , MYSQL 8 i.e on executing ./bin/magento setup:install {{PARAMS}} :
Is this a known bug?. Could you please replicate this at your end?. |
Also seeing this on upgrade from 2.4.6-p4 to 2.4.7 It seems like it may be related to this issue #37756, but I don't know why it works fine in 2.4.6-p4 and 2.4.7 throws an error. |
Yes, we also have a prefix (4 characters) in database table names and get the error. |
4 character prefix here too. So we know what the problem is, question is how to resolve and how long? |
Hi @nomis11uk Thanks for reporting and collaboration. Verified the issue by upgrading the instance from 2.4.6-p4 to 2.4.7 and the issue is not reproducible. Able to upgrade successfully. Steps to reproduce
Please refer the attached screenshots and let us know if we missed anything. |
@engcom-Dash do you have a prefix in database? |
I am wondering if this is some strange effect of an old version of Mariadb (we are on a shared server using 10.3.39 and 10.6 is the current tested requirement) or an extension/theme issue. We don't really have many extensions though, Porto, Ebizmarts, Vnecomms, Owebia, Mageplaza core and that's about it. @nomis11uk @likearocket are you running Mariadb 10.6? |
Mariadb 10.6 here. |
MySQL 5.7.44-48 |
I took our server down for a bit to test what table was throwing this error, hopefully it will shed some light for someone far more clued up than me! I added a print of the table names to the upgrade output, on line 253 of /vendor/magento/framework/Setup/Declaration/Schema/Declaration/SchemaBuilder.php:
The final line printed that presumably is the table causing the issue is: I don't know if that helps??? |
OK, this looks like its been added in 2.4.7 The table name of payment_services_order_status_data_production_submitted_hash is too long in my opinion, its 60 characters and adding my prefix of 5 characters takes it to 65 and is beyond the Mariadb limit of 64 characters. @engcom-Dash This is obviously going to affect alot of users who have a prefix on the database, are we going to have to look into reducing the prefix or do you think the table name size needs reducing? |
Hi @nomis11uk Verified the issue again with prefix but we are still not able to reproduce the issue. We have upgraded from 2.4.6-p4 to 2.4.7. Please refer the attached screenshots. |
Hi @engcom-Dash |
Hi @nomis11uk I have used --db-prefix=tsts as prefix. Thanks. |
@engcom-Dash please can you try with one more character e.g 'tsts_' |
Hi @nomis11uk Sure, will try and update the status. Thanks. |
Hi @nomis11uk Verified the issue on 2.4.7 after upgrading the instance from 2.4.6-p4 and the issue is reproducable. Hence, Confirming the issue. Steps to reproduce
We are getting the below error when we have database prefix with more than 4 characters eg: --db-prefix=tsts_ There is an error in vendor/magento/framework/Setup/Declaration/Schema/Declaration/SchemaBuilder.php at line: 253 Please refer the attached screenshot. |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-11806 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Dash. Thank you for verifying the issue. |
❌ You don't have permission to export this issue. |
@engcom-Dash The label you have added is for 2.4.6-P4, but this is actually an error in 2.4.7. The issue is the new table in 2.4.7 I don't know if there is any officially documented maximum prefix length, but most guides tend to be 5 characters. |
The fix for this issue has just been released in scope of a new Payment Services package version 2.5.0, the package is available at repo.magento.com |
Preconditions and environment
ver. 2.4.6-p4
PHP 8.2
Steps to reproduce
Note : The issue occurs when the database prefix is added with more than 4 characters eg: --db-prefix=tsts_
Expected result
Update comple
Actual result
Updating modules:
Schema creation/updates:
There is an error in vendor/magento/framework/Setup/Declaration/Schema/Declaration/SchemaBuilder.php at line: 253
Magento\Framework\Setup\Declaration\Schema\Declaration\SchemaBuilder::processTable(): Return value must be of type Magento\Framework\Setup\Declaration\Schema\Dto\Table, bool returned#0 vendor/magento/framework/Setup/Declaration/Schema/Declaration/SchemaBuilder.php(150): Magento\Framework\Setup\Declaration\Schema\Declaration\SchemaBuilder->processTable(Object(Magento\Framework\Setup\Declaration\Schema\Dto\Schema), Array)
#1 vendor/magento/framework/Setup/Declaration/Schema/SchemaConfig.php(78): Magento\Framework\Setup\Declaration\Schema\Declaration\SchemaBuilder->build(Object(Magento\Framework\Setup\Declaration\Schema\Dto\Schema))
#2 setup/src/Magento/Setup/Model/DeclarationInstaller.php(57): Magento\Framework\Setup\Declaration\Schema\SchemaConfig->getDeclarationConfig()
#3 setup/src/Magento/Setup/Model/Installer.php(868): Magento\Setup\Model\DeclarationInstaller->installSchema(Array)
#4 setup/src/Magento/Setup/Model/Installer.php(916): Magento\Setup\Model\Installer->declarativeInstallSchema(Array)
#5 setup/src/Magento/Setup/Console/Command/UpgradeCommand.php(147): Magento\Setup\Model\Installer->installSchema(Array)
#6 vendor/symfony/console/Command/Command.php(326): Magento\Setup\Console\Command\UpgradeCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 vendor/symfony/console/Application.php(1078): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand(Object(Magento\Setup\Console\Command\UpgradeCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 vendor/magento/framework/Console/Cli.php(118): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 vendor/symfony/console/Application.php(175): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 bin/magento(23): Symfony\Component\Console\Application->run()
#12 {main}
Additional information
No response
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: