Skip to content
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

Db prefix breaks 2.4.7-beta1 install #37756

Closed
1 of 5 tasks
sta1r opened this issue Jul 12, 2023 · 13 comments
Closed
1 of 5 tasks

Db prefix breaks 2.4.7-beta1 install #37756

sta1r opened this issue Jul 12, 2023 · 13 comments
Assignees
Labels
Issue: needs update Additional information is require, waiting for response Reported on 2.4.7-beta1 Indicates original Magento version for the Issue report.

Comments

@sta1r
Copy link
Contributor

sta1r commented Jul 12, 2023

Preconditions and environment

  • 2.4.7-beta1
  • PHP 8.2

Steps to reproduce

composer create-project --repository-url=https://repo.magento.com/ magento/project-enterprise-edition=2.4.7-beta1 magento-cc-2.4.7
bin/magento setup:install \
--use-secure=1 \
--use-secure-admin=1 \
--base-url=http://m247cc.am:8890 \
--base-url-secure=https://m247cc.am:8890 \
--db-host=localhost \
--db-name=commerce247 \
--db-password=root \
--db-prefix=foo_ \
--backend-frontname=admin \
--admin-firstname=Foo \
--admin-lastname=Bar \
--admin-email=admin@foo.com \
--admin-user=admin \
--admin-password=password \
--language=en_US \
--currency=USD \
--timezone=America/Chicago \
--use-rewrites=1 

Expected result

  • Magento installs correctly

Actual result

Starting Magento installation:
File permissions check...
[Progress: 1 / 1911]
Required extensions check...
[Progress: 2 / 1911]
Enabling Maintenance Mode...
[Progress: 3 / 1911]
Installing deployment configuration...
[Progress: 4 / 1911]
Installing database schema:
Schema creation/updates:

There is an error in /Sites/magento-cc-2.4.7/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 /Sites/magento-cc-2.4.7/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 /Sites/magento-cc-2.4.7/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 /Sites/magento-cc-2.4.7/setup/src/Magento/Setup/Model/DeclarationInstaller.php(57): Magento\Framework\Setup\Declaration\Schema\SchemaConfig->getDeclarationConfig()
#3 /Sites/magento-cc-2.4.7/setup/src/Magento/Setup/Model/Installer.php(849): Magento\Setup\Model\DeclarationInstaller->installSchema(Array)
#4 /Sites/magento-cc-2.4.7/setup/src/Magento/Setup/Model/Installer.php(897): Magento\Setup\Model\Installer->declarativeInstallSchema(Array)
#5 [internal function]: Magento\Setup\Model\Installer->installSchema(Array)
#6 /Sites/magento-cc-2.4.7/setup/src/Magento/Setup/Model/Installer.php(388): call_user_func_array(Array, Array)
#7 /Sites/magento-cc-2.4.7/setup/src/Magento/Setup/Console/Command/InstallCommand.php(237): Magento\Setup\Model\Installer->install(Array)
#8 /Sites/magento-cc-2.4.7/vendor/symfony/console/Command/Command.php(298): Magento\Setup\Console\Command\InstallCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /Sites/magento-cc-2.4.7/vendor/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /Sites/magento-cc-2.4.7/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand(Object(Magento\Setup\Console\Command\InstallCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /Sites/magento-cc-2.4.7/vendor/magento/framework/Console/Cli.php(116): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /Sites/magento-cc-2.4.7/vendor/symfony/console/Application.php(171): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /Sites/magento-cc-2.4.7/bin/magento(23): Symfony\Component\Console\Application->run()
#14 {main}

Additional information

Install works fine without supplying a table prefix.

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
@m2-assistant
Copy link

m2-assistant bot commented Jul 12, 2023

Hi @sta1r. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

@m2-assistant
Copy link

m2-assistant bot commented Jul 13, 2023

Hi @engcom-Dash. 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: 👇

    1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    1. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
    1. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
      - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

@engcom-Dash engcom-Dash added the Reported on 2.4.x Indicates original Magento version for the Issue report. label Jul 13, 2023
@engcom-Hotel engcom-Hotel added Reported on 2.4.7-beta1 Indicates original Magento version for the Issue report. and removed Reported on 2.4.x Indicates original Magento version for the Issue report. labels Jul 13, 2023
@engcom-Dash
Copy link
Contributor

Hi @sta1r ,

Verified the issue in 2.4.7-beta1 magento instance and the issue is not reproducible,Kindly recheck the behaviour.
As per the Dev Docs we are 2.4.7-beta1 enterprise edition with DB prefix and its installed successfully, refer the below screenshots:
Screenshot 2023-07-31 at 5 50 58 PM

@engcom-Dash engcom-Dash added the Issue: needs update Additional information is require, waiting for response label Jul 31, 2023
@sta1r
Copy link
Contributor Author

sta1r commented Aug 1, 2023

Strange, it works now. Sorry - I don't know what the problem was then.

@sta1r sta1r closed this as completed Aug 1, 2023
@River-12
Copy link

River-12 commented Nov 10, 2023

The error was again throws in 2.4.7-beta2
can anyone give me a solution how to fix it ?
image

@monteshot
Copy link
Contributor

I encountered the same issue described above while developing a custom shipping integration.
The main issue is the length of the table name (Max 64).
For instance:
was
perspective_novaposhta_counterparty_addresses_doors
added the "_contact_person"
And M2 handles names as
perspective_novaposhta_counterparty_contact_person_addresses_doo
but not as described in the DB schema.
image

@engcom-Hotel @engcom-Dash I think we need to reopen the task to clarify the exception message. What do you think about it?

FYI
@River-12 @sta1r

@monteshot
Copy link
Contributor

Affects all version of M2 with db_schema.xml

@nomis11uk
Copy link

We are also getting the same error trying to update from 2.4.6-p4 to 2.4.7. Does any know how to fix?

@nomis11uk
Copy link

@monteshot @sta1r did you find a fix for the issue?

@monteshot
Copy link
Contributor

monteshot commented Apr 9, 2024

@nomis11uk I shortened the table name.
In my case

@devchris79
Copy link

devchris79 commented Apr 16, 2024

Magento 2.4.7 adds a new table called payment_services_order_status_data_production_submitted_hash its a bit long at 60 characters, after our prefix of 4 characters and and underscore was added it took the length to 65 and beyond Mariadb limit of 64.

So anyone with a prefix of 5 or more characters including the underscore will see this error.

I reduced the prefix size and it then installed just fine.

@tibzoy
Copy link

tibzoy commented Apr 19, 2024

In my case, installation went well using --db-prefix=m_. Hope that works for you too.

@devchris79
Copy link

This has now been fixed as pointed out by @chernenm on another thread:

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
If you are already on 2.4.7 please run
composer require magento/payment-services:2.5.0 --with-all-dependencies to get the latest version.
If you are upgrading to 2.4.7 the latest package will be used automatically.

The new version "supports Adobe Commerce guidelines for the --db-prefix parameter"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: needs update Additional information is require, waiting for response Reported on 2.4.7-beta1 Indicates original Magento version for the Issue report.
Projects
None yet
Development

No branches or pull requests

8 participants