/users/activate-account pulling blank logo instead of defaulting to h2

(David Myers) #1

I wanted to use text instead of an image for my “Site Logo”, so I left the “logo_url” field blank on the Settings page.

Perfect, it looks it gets replaced with:

<h2 id="site-text-logo" class="text-logo">Text Goes Here</h2>

This was exactly as I wanted it. Unfortunately, it looks like it’s still trying to pull the non-existant img tag on /users/activate-account/ when a user is activating their account:

<img src="" alt="Text Goes Here" id="site-logo">

(David Myers) #2

If anyone has a work-around, I’d love to know. Right now the best I can think of us just replacing this line in application.html.erb

<a href="/"><img src="<%=SiteSetting.logo_url%>" alt="<%=SiteSetting.title%>" id="site-logo"></a>


<a href="/"><h2 id="site-text-logo" class="text-logo"><%=SiteSetting.title%></h2></a>

(Robin Ward) #3

A good fix would be to have the ERB template do an if statement. We’d happily accept a PR that did this if you feel up to it:

<% if SiteSetting.logo_url.present? %>
  display logo html
<% else %>
  display title html
<% end %>

(Jeff Atwood) #4

I think this might be fixed now. Can you check @eviltrout?

(Robin Ward) #5

It wasn’t fixed but now it is:


(Régis Hanol) #6