- Issue created by @pumpkinkid2
- 🇺🇸United States eahonet
I can confirm I ran into the same issue upgrading from 1.15.0 => 3.0.1. Your tip to disable and re-enable did work for me as well. I reconfigured and tweaked CSS to get it to work.
- 🇮🇳India gawalin
I ran into the same issue upgrading from 1.15.0 => 3.0.1. So I have disabled and enabled module . In the configuration when I click on the "Save Configuration " nothing is happening and error is showing in the error log.
Error statement:
Warning: foreach() argument must be of type array|object, null given in Drupal\Core\Render\Element\Checkboxes::valueCallback() (line 113 of C:\xampp-php-8.1\htdocs\website\docroot\core\lib\Drupal\Core\Render\Element\Checkboxes.php) - First commit to issue fork.
- @zoiosilva opened merge request.
- Status changed to Needs review
about 1 year ago 4:46am 19 August 2023 - Status changed to RTBC
about 1 year ago 6:05pm 23 August 2023 - 🇨🇦Canada nickdickinsonwilde Victoria, BC (T'So-uke lands)
I would argue that with no custom code in the composer.json, that relying on the drupal composer facade is more reliable - automatically copies any changes from module.info.yml. But that's very much a maintainer decision.
The other changes make total sense/tested as working. - 🇧🇷Brazil zoiosilva Brazil, MS, Dourados
Yeah, I agree. I totally forgot about that composer facade thing. But I'll leave it like that until we hear from the maintainer.
We ideally need an
hook_update_N()
setting up the default module configs.- Status changed to Needs work
about 1 year ago 9:32am 31 August 2023 - Status changed to Needs review
about 1 year ago 12:01pm 31 August 2023 Attach a patch which attempts to generate the appropriate config as part as of a database update.
I have not been able to chime in here as I have been busy with a migration to D10, but I have been checking occasionally and I appreciate the progress being made here.
I will test the patch as soon as I am able to.
- 🇨🇭Switzerland pjovanovic
I tested the patch on Drupal 9.5.8 with PHP 8.1, and it worked for me, the error on screen has vanished now, however I needed another patch to get rid of another error, issue: https://www.drupal.org/project/gtranslate/issues/3350875 🐛 Warning: foreach() argument must be of type array|object GTranslateBlock.php RTBC after I applied the patch from the issue in the link, I still had the error described in this issue, which was fixed by this patch. So in summary, it's safe to say that this patch does fix the problem.
- Status changed to RTBC
about 1 year ago 4:53pm 20 September 2023 - 🇮🇳India abhisekmazumdar India
I can confirm that after I upgraded this module from `drupal/gtranslate` 1.15.0 to 3.0.1 with Drupal 9.5, I am experiencing the mentioned WSFD with these error messages.
Applying these patches resolves the issue.
- Status changed to Needs work
about 1 year ago 1:58pm 19 October 2023 - 🇺🇸United States AaronBauman Philadelphia
The errors are gone, but my settings were not preserved.
After applying the patch and running database updates, none of the previously-configured languages are available on the widget.
Only English is available. - 🇺🇸United States wylbur Minneapolis, Minnesota, USA
I just ran this update on a fresh install from 1.15.0 to 3.0.1 with the patch from comment 11, and the configuration changes were converted and retained as config. Selected language settings were correctly converted.
During our update, no other patches from this module were applied.
- 🇨🇭Switzerland sraLton
My config was also reset from all languages to:
en, es, de, it, frI would suggest to add this information to the release-notes.
For me this error is not a game changer since its a major release. - 🇦🇺Australia pasan.gamage
Unfortunately upgrading from 1.15 breaks the configs and the widget.
It looks like a lot of the functionality has been removed from the 1.15 branch.
Below is the diff file;
I can agree with @sraLton this is a breaking change and should be added in the release notes.
Is there a plan to keep the 1.15 ready for D10?Thanks
diff --git a/config/sync/gtranslate.settings.yml b/config/sync/gtranslate.settings.yml index 5d7b168..ffb6ea0 100644 --- a/config/sync/gtranslate.settings.yml +++ b/config/sync/gtranslate.settings.yml @@ -1,113 +1,34 @@ _core: default_config_hash: Cr1Zz4OIfnOZTkDixpxKbSEOSkxTS4pH1lMNiXBUDpA -gtranslate_method: onfly -gtranslate_pro: 0 -gtranslate_enterprise: 0 -gtranslate_look: dropdown -gtranslate_flag_size: '16' -gtranslate_new_window: 0 -gtranslate_main_lang: en -gtranslate_af: '1' -gtranslate_sq: '1' -gtranslate_ar: '1' -gtranslate_hy: '1' -gtranslate_az: '1' -gtranslate_eu: '1' -gtranslate_be: '1' -gtranslate_bg: '1' -gtranslate_ca: '1' -gtranslate_zh-CN: '1' -gtranslate_zh-TW: '1' -gtranslate_hr: '1' -gtranslate_cs: '1' -gtranslate_da: '1' -gtranslate_nl: '2' -gtranslate_en: '2' -gtranslate_et: '1' -gtranslate_tl: '1' -gtranslate_fi: '1' -gtranslate_fr: '2' -gtranslate_gl: '1' -gtranslate_ka: '1' -gtranslate_de: '2' -gtranslate_el: '1' -gtranslate_ht: '1' -gtranslate_iw: '1' -gtranslate_hi: '1' -gtranslate_hu: '1' -gtranslate_is: '1' -gtranslate_id: '1' -gtranslate_ga: '1' -gtranslate_it: '2' -gtranslate_ja: '1' -gtranslate_ko: '1' -gtranslate_lv: '1' -gtranslate_lt: '1' -gtranslate_mk: '1' -gtranslate_ms: '1' -gtranslate_mt: '1' -gtranslate_no: '1' -gtranslate_fa: '1' -gtranslate_pl: '1' -gtranslate_pt: '2' -gtranslate_ro: '1' -gtranslate_ru: '2' -gtranslate_sr: '1' -gtranslate_sk: '1' -gtranslate_sl: '1' -gtranslate_es: '2' -gtranslate_sw: '1' -gtranslate_sv: '1' -gtranslate_th: '1' -gtranslate_tr: '1' -gtranslate_uk: '1' -gtranslate_ur: '1' -gtranslate_vi: '1' -gtranslate_cy: '1' -gtranslate_yi: '1' -gtranslate_bn: '1' -gtranslate_bs: '1' -gtranslate_ceb: '1' -gtranslate_eo: '1' -gtranslate_gu: '1' -gtranslate_ha: '1' -gtranslate_hmn: '1' -gtranslate_ig: '1' -gtranslate_jw: '1' -gtranslate_kn: '1' -gtranslate_km: '1' -gtranslate_lo: '1' -gtranslate_la: '1' -gtranslate_mi: '1' -gtranslate_mr: '1' -gtranslate_mn: '1' -gtranslate_ne: '1' -gtranslate_pa: '1' -gtranslate_so: '1' -gtranslate_ta: '1' -gtranslate_te: '1' -gtranslate_yo: '1' -gtranslate_zu: '1' -gtranslate_my: '0' -gtranslate_ny: '0' -gtranslate_kk: '0' -gtranslate_mg: '0' -gtranslate_ml: '0' -gtranslate_si: '0' -gtranslate_st: '0' -gtranslate_su: '0' -gtranslate_tg: '0' -gtranslate_uz: '0' -gtranslate_am: '0' -gtranslate_co: '0' -gtranslate_haw: '0' -gtranslate_ku: '0' -gtranslate_ky: '0' -gtranslate_lb: '0' -gtranslate_ps: '0' -gtranslate_sm: '0' -gtranslate_gd: '0' -gtranslate_sn: '0' -gtranslate_sd: '0' -gtranslate_fy: '0' -gtranslate_xh: '0' +source_lang: en +widget_look: dropdown +url_structure: none +flag_size: 16 +flag_style: 2d +globe_size: 60 +color_scheme: light +alt_flags: { } +wrapper_selector: .gtranslate_wrapper +float_position: bottom-left +float_switcher_open_direction: top +position: inline +switcher_open_direction: bottom +native_language_names: 1 +detect_browser_language: 0 +enable_cdn: 1 +add_new_line: 1 +select_language_label: 'Select Language' +custom_domains: 0 +custom_domains_config: '' +custom_css: '' +languages: + en: en + nl: nl + fr: fr + de: de + it: it + pt: pt + ru: ru + es: es +flag_languages: + en: en
- First commit to issue fork.
- 🇪🇸Spain rcodina Barcelona
I just reverted my commit on the MR. I'm sorry. The problem is that somehow the upgrade hook didn't got executed on my site. After hours of investigation, I found out that the given the drupal's registry, the update hook 9301 was really executed. However, at somepoint someone did not execute a "drush cex".
I am able to confirm that patch in #11 has worked for me as well, thank you @codebymikey!
- Status changed to RTBC
10 months ago 12:02am 29 January 2024 - 🇺🇸United States asokolov
This #11 works for us as well, do we have any plans to release this sooner?