0

I am getting so frustrated by Magento 2 static deploys and it's not working for me. It did but not anymore. I have the following situation

  • Store 1 - english
  • Store 2 - Dutch (nl_NL)
  • Store 3 - German (de_DE)

The NL and DE languages are installed through the mageplaze composer modules. Magento just doesn't show the correct translations

When I deploy nl_NL

magerun2 setup:static-content:deploy -f nl_NL

it shows

Deploy using quick strategy

frontend/Magento/blank/nl_NL            2593/2593           ============================ 100% %  6 secs
adminhtml/Magento/backend/nl_NL         2374/2374           ============================ 100% %  6 secs
frontend/Magento/luma/nl_NL             2609/2609           ============================ 100% %  6 secs
frontend/Smartwave/porto/nl_NL          2780/2780           ============================ 100% %  7 secs
frontend/Smartwave/porto_rtl/nl_NL      2783/2783           ============================ 100% %  7 secs
frontend/Smartwave/porto_child/nl_NL    2780/2780           ============================ 100% %  7 secs
frontend/Smartwave/porto_b2b/nl_NL      2780/2780           ============================ 100% %  7 secs

I also see the locale folders in the pub static folders

I also did the following

- rm -rf var/cache/ var/generation/* var/page_cache/ var/view_preprocessed/ pub/static/* var/composer_home - Disabled all cache - Through commandline cleared varnish - Disabled varnish - Reconfigured varnish

when I look at my frontpage code I see this

<head >
    <script>
var BASE_URL = 'http://....com/nl/';
var require = {
    "baseUrl": "http://......com/static/frontend/Smartwave/porto_child/en_GB"

I have no idea anymore :(

also tried production mode

php bin/magento deploy:mode:set production
Enabling maintenance mode
Config "dev/debug/debug_logging = 0" has been saved.
Starting compilation
Compilation was started.
%message% 0/7 [>---------------------------]   0% < 1 sec 72.0 MiB%message% 0/7 [>---------------------------]   0% < 1 sec 72.0 MiBProxies code generation... 0/7 [>---------------------------]   0% < 1 sec 72.0 MiB
Proxies code generation... 1/7 [====>-----------------------]  14% < 1 sec 74.0 MiB
Repositories code generation... 1/7 [====>-----------------------]  14% < 1 sec 74.0 MiB
Repositories code generation... 2/7 [========>-------------------]  28% 7 secs 224.0 MiB
Service data attributes generation... 2/7 [========>-------------------]  28% 7 secs 224.0 MiB
Service data attributes generation... 3/7 [============>---------------]  42% 7 secs 224.0 MiB
Application code generator... 3/7 [============>---------------]  42% 7 secs 224.0 MiB
Application code generator... 4/7 [================>-----------]  57% 12 secs 246.0 MiB
Interceptors generation... 4/7 [================>-----------]  57% 12 secs 246.0 MiB
Interceptors generation... 5/7 [====================>-------]  71% 23 secs 300.0 MiB
Area configuration aggregation... 5/7 [====================>-------]  71% 23 secs 300.0 MiB
Area configuration aggregation... 6/7 [========================>---]  85% 31 secs 404.0 MiB
Interception cache generation... 6/7 [========================>---]  85% 31 secs 404.0 MiB
Interception cache generation... 7/7 [============================] 100% 35 secs 410.0 MiB
Generated code and dependency injection configuration successfully.
Compilation complete
Starting deployment of static content

Deploy using quick strategy
frontend/Magento/blank/nl_NL            2593/2593           ============================ 100% %  13 secs
adminhtml/Magento/backend/nl_NL         2374/2374           ============================ 100% %  14 secs
frontend/Magento/blank/de_DE            2593/2593           ============================ 100% %  13 secs
frontend/Magento/blank/en_GB            2593/2593           ============================ 100% %  12 secs
frontend/Magento/blank/en_US            2593/2593           ============================ 100% %  15 secs
adminhtml/Magento/backend/de_DE         2374/2374           ============================ 100% %  13 secs
adminhtml/Magento/backend/en_GB         2374/2374           ============================ 100% %  13 secs
adminhtml/Magento/backend/en_US         2374/2374           ============================ 100% %  13 secs
frontend/Magento/luma/nl_NL             2609/2609           ============================ 100% %  15 secs
frontend/Smartwave/porto/nl_NL          2780/2780           ============================ 100% %  15 secs
frontend/Magento/luma/de_DE             2609/2609           ============================ 100% %  14 secs
frontend/Magento/luma/en_GB             2609/2609           ============================ 100% %  14 secs
frontend/Magento/luma/en_US             2609/2609           ============================ 100% %  14 secs
frontend/Smartwave/porto/de_DE          2780/2780           ============================ 100% %  16 secs
frontend/Smartwave/porto/en_GB          2780/2780           ============================ 100% %  15 secs
frontend/Smartwave/porto/en_US          2780/2780           ============================ 100% %  14 secs
frontend/Smartwave/porto_rtl/nl_NL      2783/2783           ============================ 100% %  15 secs
frontend/Smartwave/porto_child/nl_NL    2780/2780           ============================ 100% %  17 secs
frontend/Smartwave/porto_b2b/nl_NL      2780/2780           ============================ 100% %  15 secs
frontend/Smartwave/porto_rtl/de_DE      2783/2783           ============================ 100% %  14 secs
frontend/Smartwave/porto_rtl/en_GB      2783/2783           ============================ 100% %  15 secs
frontend/Smartwave/porto_rtl/en_US      2783/2783           ============================ 100% %  16 secs
frontend/Smartwave/porto_child/de_DE    2780/2780           ============================ 100% %  15 secs
frontend/Smartwave/porto_child/en_GB    2780/2780           ============================ 100% %  14 secs
frontend/Smartwave/porto_child/en_US    2780/2780           ============================ 100% %  14 secs
frontend/Smartwave/porto_b2b/de_DE      2780/2780           ============================ 100% %  17 secs
frontend/Smartwave/porto_b2b/en_GB      2780/2780           ============================ 100% %  14 secs
frontend/Smartwave/porto_b2b/en_US      2780/2780           ============================ 100% %  14 secs

Execution time: 430.81158995628
Deployment of static content complete
Disabling maintenance mode
Enabled production mode.
0

Fixed. Issue was the nginx multistore settings

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.