# Start page broken for admins & moderators

**URL:** <https://meta.discourse.org/t/start-page-broken-for-admins-moderators/80516>\
**Category:** Support\
**Created:** [February 14, 2018, 9:04am UTC](https://meta.discourse.org/t/start-page-broken-for-admins-moderators/80516 "2018-02-14T09:04:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonasth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonasth/32/120324_2.png) [@jonasth](https://meta.discourse.org/u/jonasth)\
**Post date:** [February 14, 2018, 9:04am UTC](https://meta.discourse.org/t/start-page-broken-for-admins-moderators/80516/1 "2018-02-14T09:04:19Z")

</div>

Hi,

We have a discourse forum where admins and moderators currently can’t visit the start page, because it renders a 500 Internal Server Error page. It works fine for normal users and logged-out users.

Separate thread and category views work fine for all users (including admins/moderators), and the admin page works fine.

Discourse version: v2.0.0.beta2

The error in the logs:

```
/var/www/discourse/app/models/category.rb:439:in `url'
/var/www/discourse/app/helpers/topics_helper.rb:16:in `categories_breadcrumb'
/var/www/discourse/app/views/topics/show.html.erb:5:in `_app_views_topics_show_html_erb___1372095578456862489_70244849918320'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.4/lib/action_view/template.rb:157:in `block in render'

```

The line where it blows up:  
`url << "/#{parent_category.slug}" if parent_category_id`

Looking at the backtrace and the code (I am not a ruby dev) it seems it’s building a list of topics for the start page. The parent\_category variable is null but the parent\_category\_id is set, so I think there’s a topic with a reference to a non-existing category?

In that case there’s a broken topic with a non-existing category that only admins and moderators can see.

Has anyone seen this error before?  
Or maybe a suggestion how to find this broken topic in the database?

Cheers

---

<div class="post-metadata">

**Author:** ![jonasth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonasth/32/120324_2.png) [@jonasth](https://meta.discourse.org/u/jonasth)\
**Post date:** [February 14, 2018, 10:45am UTC](https://meta.discourse.org/t/start-page-broken-for-admins-moderators/80516/2 "2018-02-14T10:45:59Z")

</div>

Resolved. A category was created with a non-existing parent category ID.

---

<div class="post-metadata">

**Author:** ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)\
**Post date:** [February 16, 2018, 1:00am UTC](https://meta.discourse.org/t/start-page-broken-for-admins-moderators/80516/3 "2018-02-16T01:00:09Z")

</div>

This topic was automatically closed after 22 hours. New replies are no longer allowed.
