Problem/Motivation

All Webforms listed on Content languages configuration form (/admin/config/regional/content-language) eventhough Webform submissions are not translateable.

From @mpp (Drupal Slack)

Could someone explain why *each* webform is an entity bundle?

I'm not sure if this is a very scalable approach, a website with 10,000 webforms would have a huge config base to sync. Also on the language UI one would have to configure 10,000 bundles.

Proposed resolution

OPTION 1: Alter Content languages configuration form and hide webform submissions.

OPTION 2: Remove webform bundle information for the Webform Submission entity.

Notes

Bundle settings were included because webform submission entity annotation was copied from the node entity annotation. Webform submission might not require bundle=webform

Remaining tasks

TDB

Comments

jrockowitz created an issue. See original summary.

jrockowitz’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.27 KB
new835 bytes

OPTION 1: Seems like a safer solution.

OPTION 2: Patch does not remove 'Webform submission' from Content languages configuration form

jrockowitz’s picture

@Berdir posted an explanation on Drupal Answers.

When to use Bundles vs Entity Types [design]

The last submitted patch, 2: 3049023-OPTION-2-2.patch, failed testing. View results

jrockowitz’s picture

Title: All Webforms listed on Content languages configuration form » All Webforms are listed on Content languages configuration form
Issue summary: View changes
StatusFileSize
new353.04 KB
mpp’s picture

from slack:

@jrockowitz, I'd go for option 2 to remove the bundle but as you can see using a bundle has a lot of implications.

@mpp I am not sure I can remove the bundle without causing major regressions.

jrockowitz’s picture

I think using the bundle relationship is required and needed because it makes sure when webform is deleted all related submissions are deleted.

The bundle might also be required for #3002547: Allow fieldable webform submissions

jrockowitz’s picture

StatusFileSize
new1.13 KB

I am concerned that sites may have existing language.content_settings.webform_submission.* files

The attached patch only removes 'Webform submission' from the Content language admin settings form, only when there are no previously saved language.content_settings.webform_submission.* config files.

We could write an update hook that deletes all previously saved language.content_settings.webform_submission.* config files. This could cause a lot of problems for people using config import.

Another approach would be to remove all previously saved language.content_settings.webform_submission.* config files via the drush webform:repair command.

jrockowitz’s picture

StatusFileSize
new7.88 KB

Moving ahead with OPTION 1.

The attached patch includes an update hook and `drush webform-repair` support which removes unneeded language.content_settings.webform_submission.* configuration.

jrockowitz’s picture

jrockowitz’s picture

Issue summary: View changes

  • jrockowitz committed 148ee4d on 8.x-5.x
    Issue #3049023 by jrockowitz: All Webforms are listed on Content...
jrockowitz’s picture

Status: Needs review » Fixed

  • jrockowitz committed 685e640 on 8.x-5.x
    Issue #3049023: All Webforms are listed on Content languages form.
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.