Issue
With the Webform Localization module, you can choose to use a single webform across all translated copies of a webform. This causes PHP errors with Webform Classes when a translated copy of a webform node is viewed, as webform_classes_form_alter() just uses the nid from the form's #id attribute to apply classes.
Proposed solution
In webform_classes_form_alter(), check if the Webform Localization module is enabled, if so, attempt to look up the localization configuration for the webform node's tnid. If such configuration exists AND the source node has been configured to use a single webform, use the source node's NID and webform classes instead.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | webform_classes-webform-localization-support-2340129-2.patch | 1.24 KB | Scott Robertson |
Comments
Comment #1
Scott Robertson commentedA patch is attached for the proposed solution.
Comment #3
Scott Robertson commentedFixed patch for automated testing.
Comment #4
Scott Robertson commentedComment #6
devd commentedThanks Robertson.