-
-
Notifications
You must be signed in to change notification settings - Fork 71
Closed
Labels
area: backendChanges to server-side codeChanges to server-side codearea: frontendChanges to front-end codeChanges to front-end codecomplexity: unassessedNeeds further developer investigation before complexity/feasibility can be determined.Needs further developer investigation before complexity/feasibility can be determined.priority: medium
Description
The newest community on our network, Proposals, is missing from the list of communities shown in the page footer, but is present in the communities drop-down widget in the header.
The footer HTML:
<div class="grid--cell is-6 is-12-md is-12-sm">
<h3>Other Codidact Communities</h3>
<ul>
<% Rails.cache.persistent('codidact_sites').each do |site| %>
<li><%= link_to site['name'], site['canonical_url'] %></li>
<% end %>
</ul>
</div>I understand why we would want to cache that; otherwise every single page load would be affected. Is the cache stuck? I assume it could be manually flushed, but is there something we could do in our code to avoid the need for manual intervention?
(Aside: if someone's editing that anyway, can we change "Codidact" to "Network" in the heading, in keeping with other attempts to generalize strings in the code?)
The drop-down code, for reference, seems to compute the list dynamically. I assume that would be a terrible idea in the footer:
<h3 class="h-m-t-1">Communities</h3>
<div class="community-header-list">
<% logo_paths = SiteSetting.all_communities('SiteLogoPath') %>
<% Community.where(hidden: false).each do |c| %>
<div class="community-header-list-entry">
<% logo_setting = logo_paths[c.id] %>
<%= link_to "//#{c.host}" do %>
<% if logo_setting.present? %>
<div class="img">
<img src="<%= logo_setting %>" alt="<%= c.name %>" class="community-header-list-image">
</div>
<% end %>
<div class="label">
<%= c.name %>
</div>
<% end %>
</div>
<% end %>
</div>Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: backendChanges to server-side codeChanges to server-side codearea: frontendChanges to front-end codeChanges to front-end codecomplexity: unassessedNeeds further developer investigation before complexity/feasibility can be determined.Needs further developer investigation before complexity/feasibility can be determined.priority: medium