Sidebar activation issues after recent Doc Categories update

Oh no, that’s not great.

Do you still have the output of bundle exec rake doc_categories:build_sidebar? (Feel free to send me a PM if it’s private)

So far I have not seen issues here on Meta + Horizon but there could be a state I am missing. If you have data explorer, can you check if there are indexes, sections, and links created?

query
SELECT
  i.category_id,
  i.index_topic_id,
  sec.section_names,
  lnk.section_links
FROM doc_categories_indexes i
LEFT JOIN LATERAL (
  SELECT
    string_agg(COALESCE(s.title, ''), ', ' ORDER BY s.position) AS section_names
  FROM doc_categories_sidebar_sections s
  WHERE s.index_id = i.id
) AS sec ON TRUE
LEFT JOIN LATERAL (
  SELECT
    string_agg(l.href, ', ' ORDER BY s.position, l.position) AS section_links
  FROM doc_categories_sidebar_sections s
  LEFT JOIN doc_categories_sidebar_links l
    ON l.sidebar_section_id = s.id
  WHERE s.index_id = i.id
) AS lnk ON TRUE
ORDER BY i.category_id, i.index_topic_id;

One vector is the site cache. Since categories are cached for 30 minutes, the update may have happened and the regular sidebar is cached prior to the running of the rake task.

1. migration to table
2. cache miss -> sees normal sidebar instead of docs sidebar
3. rake task to build sidebar
4. should see rebuilt sidebar

Technically, (4) should happen and reset the cache. If that’s the issue, you should be seeing them by now.

3 Likes