GithubHelp home page GithubHelp logo

Comments (15)

maxiorel avatar maxiorel commented on June 16, 2024 1

:-) That was my first idea, but no luck.

Anyway, I think the base token [submission:values] should work in any cases. No need to specify each field.

from webform.

olafgrabienski avatar olafgrabienski commented on June 16, 2024

Interesting! On my site, I am able to send submission values by e-mail. In my case, the values have the appendix :nolabel, for example: [submission:values:event:nolabel]

Are you using appendixes in your tokens? I'm not sure if they are (supposed to be) necessary, but maybe worth a try.

from webform.

maxiorel avatar maxiorel commented on June 16, 2024

No luck, just tried and the same error with [submission:values:layout:left:your_name:nolabel]

from webform.

olafgrabienski avatar olafgrabienski commented on June 16, 2024

Hm, what does the layout:left part mean? Is it a fieldset?

from webform.

maxiorel avatar maxiorel commented on June 16, 2024

It is Layout box (layout) > Fieldset (left) > Field (your_name)

from webform.

olafgrabienski avatar olafgrabienski commented on June 16, 2024

Ok, so one idea: Have you tried to use just [submission:values:your_name:nolabel], maybe after moving the webform component outside of any wrapper?

from webform.

maxiorel avatar maxiorel commented on June 16, 2024

Tried whole new webform without layouts and fields. Still the same problem. Also tried PHP 7.4, 8.0, 8.1, same error.

from webform.

maxiorel avatar maxiorel commented on June 16, 2024

Quick and dirty fix:
webform.token.inc, line 168. This is problematic:
$replacements[$original] = backdrop_render($submission_renderable);

I've changed it to:
$data = array();
array_walk_recursive($submission->data, function($a) use (&$data) { $data[] = $a; });
$replacements[$original] = implode("\n", $data );

And now [submission:values] token works.

from webform.

olafgrabienski avatar olafgrabienski commented on June 16, 2024

Glad to hear you have a fix! I'm still wondering why the submission values didn't work on your site in the first place. (As they work on my site.)

from webform.

argiepiano avatar argiepiano commented on June 16, 2024

It seems to me that you have a faulty textfield component in your webform, which produces the error. Can you provide more details about the components?

from webform.

maxiorel avatar maxiorel commented on June 16, 2024

It seems to me that you have a faulty textfield component in your webform, which produces the error. Can you provide more details about the components?

I don't think so. As mentioned above, I created another webform with one textfield only and got the same error if default mailing enabled.

from webform.

argiepiano avatar argiepiano commented on June 16, 2024

If this is a bug, the only way to fix it is to be able to reproduce it. The info you've provided is not enough to reproduce it. I'm trying on a clean install, with Webform with one textfield component, and the token replacement in the email is working fine. @olafgrabienski also has noticed it's working for him. The only explanation is that you may have something in your site that's interfering with the normal actions.

Do you have any other webform-related contrib installed? Do you have Entity Tokens installed? It may be a good idea to provide a list of contrib modules.

from webform.

argiepiano avatar argiepiano commented on June 16, 2024

Also what do you mean by "default mailing enabled"?

from webform.

argiepiano avatar argiepiano commented on June 16, 2024

Have you tried playing with the settings about empty components?
Screen Shot 2023-08-17 at 1 57 06 PM

BTW, re-reading your tokens above - where did you get those "layout:left" tokens? Are those actually listed in the token modal that lists all available tokens? Those do not exist in my installation. Are those produced by a contrib module?

from webform.

maxiorel avatar maxiorel commented on June 16, 2024

Sorry. I mean default e-mail template for webform submission. Forget my first real life example with layouts. To simplify the problem, I've created simple webform with one (required) textfield only and the problem is the same with default e-mail template. There are not any other modules working with webforms, forms at all or with tokens. The problem occurs in backdrop_render($submission_renderable) as I mentioned.

from webform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.