- Issue created by @MegaphoneJon
- 🇺🇸United States colemanw
Former-but-no-longer-maintainer here just chiming in to say that behavior sounds "not good" because labels and names are only interchangeable if the site is in English. Sounds like the current behavior is gonna be broken for any non-English installs.
- 🇨🇦Canada karing 🇨🇦
Thanks Jon. I'll ask Jitendra to take a look.
Also why would you want to edit these labels in the webform but not in CiviCRM options?
- 🇺🇸United States colemanw
The original intent of that feature was that you can change the labels of dropdown options on a per-webform basis in case they have a different meaning in different contexts, for example on a particular form you can re-label your group called "Public Mailing List" to "Yes, Sign Me Up for Mailings!"
- 🇨🇦Canada karing 🇨🇦
That case I understand. I was just wondering about why one would want to do that with prefix Mr, Mrs, etc (as opposed to creating new options in CiviCRM).
We do change option labels a fair bit on all sorts of webforms and have not run into this WSOD yet.
Thanks (as always) for the detailed and helpful report Jon!
- 🇺🇸United States MegaphoneJon
The use case: My client has chapters around the world, but the staff all use one of 3 languages. So Civi supports those 3 languages, but forms can be in any of several languages.
- 🇺🇸United States MegaphoneJon
To be clear - I think the step here is to decide whether the `webform_civicrm_webform_submission_load` is necessary. I couldn't see any difference without it, so maybe other code has matured around it?
- Status changed to Needs review
over 1 year ago 9:45am 3 June 2023 - 🇮🇳India jitendrapurohit
@MegaphoneJon I was able to replicate the wsod on Notes submit form. But looks like in my case, the reason for the fatal error was missing submission object in src/WebformCivicrmPostProcess.php.
Re webform_civicrm_webform_submission_load() - I agree this could be removed. Thanks for spotting it.
I've raised a PR - https://github.com/colemanw/webform_civicrm/pull/880
Can you please review it & confirm if it resolves the error for you as well?
- 🇺🇸United States MegaphoneJon
Hi @jitendrapurohit - I just tested the PR, and it didn't change the behavior for me.
With XDebug I confirmed that your code is getting hit. I cleared cache and confirmed that the error was the same. Does this only work on submissions made after the patch, or should it work when editing submissions made before the patch was installed?