Welcome header text %{site_name} gives error: The following interpolation key is invalid: site_name

The following interpolation key is invalid: site_name

1 Like

I think “Site_text” is not available. When I try to edit the text at /admin/customize/site_texts/js.welcome_banner.header.new_members?locale=en I can see that only the name is available.


I think site_name is only available for anonymous users. I guess the description needs an update.

3 Likes

Alright thanks for the info, for now I am using CSS to put the site name. Was just having a problem underlining it in the welcome text.

For some reason only %site_name works for annoymous visitors.

I would like to do:

Welcome, %{preferred_display_name}, to %{site_name}!

But its not possible to do this, its making underlining/CSS adjustments difficult in this area.

That makes sense. They didn’t log in, so we don’t know who they are. There is no name for them in the database.
It’s like when someone you don’t know rings your doorbell; you won’t be able to greet them by name until they introduce themselves.

1 Like

Yes, but I would like to use that %site_name for logged in users as well :smiley:

Thanks for reporting it! Looks like I over-promised which variables were available
I’ve got an update coming that will correct this.

3 Likes

So we still can’t add %{site_name} if user is logged in?

Hmm
 it certainly looks that way:


I suppose you might be able to display the site name with a Theme Component by making a request to /about.json and getting the site title (I looked at the site service and couldn’t find anything about the site title).

The siteSetting service might work to get the value of the title site setting

1 Like