-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Theme compilation breaks when mysql host contains port information #38799
Comments
Hi @FilipeBicho. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Hi @engcom-Delta. Thank you for working on this issue.
|
Hi @FilipeBicho , Thanks for reporting and collaboration. Verified the issue in magento 2.4-develop and 2.4.7 instance and the issue is not reproducible. Steps to reproduce:- 1.Go to app-> etc->env.php Please refer the attached screenshots and let us know if we missed anything. ![]() No error ![]() |
I reproduced this error on a Magento Project that we recently updated to 2.4.7-p1.
While this bug is not fixed there is a workaround to compile statics properly without using --jobs param |
Hi @FilipeBicho , Verified the issue on 2.4.7 and it is reproducible. Hence, Confirming the issue. Steps to reproduce:- 1.Flush the Magento cache, e.g. bin/magento c:f Flush the Magento cache ![]() Set the port information to the host in the db connection. e.g. db['connection']['default']['host'] = 'localhost:3306' ![]() Run bin/magento setup:static-content:deploy --force --strategy standard --jobs 4 ![]() |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-12176 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Delta. Thank you for verifying the issue. |
I opened a PR to fix this issue -> #38842 |
Encountered the same problem. PR works for me. |
Preconditions and environment
Steps to reproduce
env.php
db<'connection']['default']['host'] = 'localhost:3306'
./magento.sh setup:static-content:deploy
Expected result
The theme is deployed
Actual result
Exception:
Port must be configured within host parameter (like localhost:3306 in /var/www/lehner_dev/src/www/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:464
Additional information
Possible solution:
``{{
diff --git a/DB/Adapter/Pdo/Mysql.php b/DB/Adapter/Pdo/Mysql.php
--- a/DB/Adapter/Pdo/Mysql.php (revision 2dc0b58888392ed5304ac6ad02e36a70e6e490a2)
b/DB/Adapter/Pdo/Mysql.php (date 1717577596939)
@@ -432,6 432,11 @@
$this->parentConnections[] = $this->_connection;
$this->_connection = null;
$this->pid = getmypid();
if (isset($this->*config['port']) && !str_contains($this->config['host'], '/')) {
if (!strcontains($this->*config['host'], ':'))
$this->*config['host'] .= ':' . $this->*config['port'];
unset($this->_config['port']);
}}``
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: