4

I've a multilanguage site, with Italian set as default and English as secondary language.

When exporting the configuration via drush - drush cex command - sometimes the labels of other kind of content is exported, but the only actual difference is the change of language.

This happens often with a lot of views.

For example, for views.view.who_s_online.yml the difference is:

 @@ -41,7 +41,7 @@ display:
          submit_button: Apply
          reset_button: false
          reset_button_label: Reset
        - exposed_sorts_label: 'Sort by'
        + exposed_sorts_label: 'Ordina per'
          expose_sort_order: true
          sort_asc_label: Asc
          sort_desc_label: Desc

But there are other settings, for the "en" translation that sometimes differs only for the translation.

E.g. for en\field.field.node.article.body.yml the difference is:

 @@ -1,0 +1,0 @@
 - label: Abstract
 + label: Body

This is frustating because I often have to check a lot of files with no real difference. For some is actually dangerous as e.g. en\addtoany.settings.yml keeps to lose its settings during the export.

When this happens I've tried both to commit the exported files with just the language differences, or to discard them and to import the configuration (drush cim).

Neither of the solution are working long-term, as the problem appears again after a bit.

I've checked for possible issues on the drupal issue queue but found nothing. Any help?

8
  • Can it be that you switched the language in your user profile before the export?
    – leymannx
    Feb 18, 2021 at 17:46
  • @leymannx could you elaborate more your statement? Do you mean in the browser? I mean, if the last page loaded is in "en" language, then drush will export in english? In the opposite case, in italian?
    – Giuseppe
    Feb 18, 2021 at 20:59
  • I mean your Drupal user account. There you can switch the language in which the interface is being displayed. Did you switched the language there?
    – leymannx
    Feb 18, 2021 at 21:08
  • @leymannx No, the admin language has always been 'IT'. Btw the "Detection and selection" of the language order (from top to bottom) is: Selected language -> URL -> User -> Browser. Could be that somewhat related?
    – Giuseppe
    Feb 19, 2021 at 9:22
  • 1
    Yes this is a good idea, as soon as I'll have a bit of extra time I could try to set up a vanilla and replicate the settings of the D9 site with problems, to see if I could replicate what is causing the problem. Otherwise I find difficult to create a precise bug report - but the feature for drush would be certainly a good thing.
    – Giuseppe
    Mar 26, 2021 at 10:56

0

Your Answer

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

Browse other questions tagged or ask your own question.