- Issue created by @nofue
- 🇩🇰Denmark ressa Copenhagen
Did you verify that these tokens exist? You should be able to see all available tokens under
/admin/help/token
if you have both Token and Help modules installed.I just tried creating a new field "First name" (
field_first_name
) and the token to use it was[simplenews-subscriber:user:field_first_name]
which looks different from the structure of your tokens.I tried sending a newsletter, and the First name was included, via the token. The token also took effect, just viewing the node.
If I enable "Customization > Newsletter tokens (caution)" under
/admin/config/services/simplenews/settings/newsletter:
I see this on the Simplenews edit form:Replacement patterns
Browse available tokens.
These tokens can be used in all text fields except subject and will be replaced on-screen and in the email.And if I click "Browse available tokens", a Token browser pops up.
- 🇦🇹Austria nofue
Thanks, @ressa. Seems the Token module was missing -- makes me wonder why simplenews doesn't require it in the first place?
And even now, when everything works, the token reads[simplenews-subscriber:field_firstname]
without the:user
part your see.
Oh, those Gremlins … - Status changed to Closed: works as designed
9 months ago 1:31pm 8 March 2024 - 🇩🇰Denmark ressa Copenhagen
Thanks for conforming that it does work. But it seems to not be clear that Tokens are required ...
How about we make this issue about fixing that problem? It is Open Source after all, and there's no one to improve it, but us -- the community.
A first step could be that you added a few steps under "Steps to reproduce" and "Proposed resolution", and then we can all work on fixing it? Also, was the "Newsletter tokens" option shown as active, and could you enable it, even without Token module enabled? This does seem counter intuitive, if it's an active option ... The checkbox should probably be greyed out.
- 🇦🇹Austria nofue
@ressa, I very much appreciate your attitude. Glad if I can be of help with this -- let's see if I can still remember. I'm going to edit the initial post per your suggestion. Have a great day.
- Status changed to Active
9 months ago 6:23pm 8 March 2024 - 🇩🇰Denmark ressa Copenhagen
I am glad you agree, and thanks for updating the Issue Summary @nofue, I very much appreciate it. I'll also update the title and compress the "Problem" and other sections, to align it more with the new direction of the issue, to try to make it more immediately clear what the challenge is for new readers.
I am not sure about making the Token module a requirement ... It is probably taking it too far, since not everyone will be using tokens.
But I agree that making the Token requirement clearer on the
/admin/config/services/simplenews/settings/newsletter
page would be a big step in the right direction, and I have added a suggestion under your point "a." about that. Thanks!