Cannot use base_url or user_perferences_url in unsubscribe text

At admin/customize/site_texts/unsubscribe_link entering %{base_url} in the text gives The following interpolation key(s) are invalid: "base_url".

Likewise for user_preferences_url. However discourse/message_builder.rb at 1472e47aae5bfdfb6fd9abfe89beb186c751f514 · discourse/discourse · GitHub suggests both should be available.

1 Like

I am not sure that this is a bug. There is nothing displayed in the Discourse user interface that would indicate that the base_url or user_preferences_url placeholders can be used here.

It would be great if the placeholders that are available for each template could be listed with the templates, instead of forcing users to guess about them, or find them in the Discourse code.

I agree with you that from looking at the code it seems that both of these placeholders should be available, so maybe that’s something that can be fixed. It’s possible that we’re both reading the code incorrectly though.

2 Likes