not able to translate

Created on 28 August 2023, over 1 year ago
Updated 2 December 2023, about 1 year ago

Problem/Motivation

webform module got updated to 6.1.5 recently. we noticed that the translation is not working after that.
getting following error
TypeError: Cannot access offset of type string on string in Drupal\webform\WebformTranslationConfigManager::validateWebformForm() (line 284 of /mnt/www/html/tsedev/docroot/modules/contrib/webform/src/WebformTranslationConfigManager.php)

$values['translation'] data is coming empty. few days back it was working perfectly.

Steps to reproduce

1. drupal 9.5.10
2. install webform 6.1.5
3. install and configured translated modules
4. create webform
5. try to translate

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Closed: cannot reproduce

Version

6.1

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia soutams

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @soutams
  • Status changed to Postponed: needs info over 1 year ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States jrockowitz Brooklyn, NY

    Are you able to replicate this issue on a simpler webform?

    Are you able to replicate this issue on a plain vanilla instance of Drupal/Webform?

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia soutams

    we are able to replicate in vanilla instance.

    1. installed drupal 9 (latest)
    2. installed webform (6.1.5)
    3. configured translation for multiple languages
    4. import form to vanilla instance
    5. now we are not able to translated the imported form.

  • Please post the configuration of the form you imported in step 4.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia soutams

    @cilefen, file attached.

  • Thank you. But that form is very large. Can you please remove elements to the bare minimum that reproduce the bug, and then share that YAML file?

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia soutams

    have deleted few elements and attached here. please let me know if you need further filtration.
    you can just try to translate the title field. it is giving below error

    TypeError: Cannot access offset of type string on string in Drupal\webform\WebformTranslationConfigManager::validateWebformForm() (line 284 of modules/contrib/webform/src/WebformTranslationConfigManager.php).

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States jrockowitz Brooklyn, NY

    I think you need to check your post_max_size and increase it.

    One way to confirm this is to remove a bunch of fields from your form, and it will most likely start working as expected.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia soutams

    we have replicated the form manually. exactly same form created manually. the issue is not coming for the new form. so I'm thinking it is not related to form configuration. Since the fields and configuration of both the forms are same so I don't think it is related to post_max_size.

    are you able to replicate the issue?

  • @soutams Can you replicate the problem on a form that has a single element?

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia soutams

    @cilefen,
    if i create new form it is working as expected. when I replicated the form manually it was also working fine. somehow this form is giving the error.

    The translation data is coming empty/blank in the validation method in modules/contrib/webform/src/WebformTranslationConfigManager.php. But when I check the post data from browser I can see all the data are sending to server.

  • You can export the configuration of each form with Drupalโ€™s Configuration Sync admin tool and use a diff program to investigate.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia soutams

    we have done the comparative study. we have found that the issue is coming because of 3 select fields (intended_use_of_building_nl,intended_use_of_building_sv,intended_use_of_building_fr). even we deleted these fields and created a new select field. we also got the error. we did not face the error when we created a text field instead of select field.

    we are unable to find the root cause. we are still faceing the issue

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States jrockowitz Brooklyn, NY

    Your webform depends on custom code via ajax_webform.module and webform_custom_validation.module. Does the issue go away if you remove the dependencies?

    Please upload the webform without dependencies, and I will try to install it locally.

    You could also try installing the webform via https://simplytest.me.

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada Liam Morland Ontario, CA ๐Ÿ‡จ๐Ÿ‡ฆ

    What version did you upgrade from? If it worked in a previous version, you can use git bisect to help figure out which commit broke it.

  • Status changed to Closed: cannot reproduce about 1 year ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States jrockowitz Brooklyn, NY
Production build 0.71.5 2024