# Default pinned topic does not show due to policy plugin

**URL:** <https://meta.discourse.org/t/default-pinned-topic-does-not-show-due-to-policy-plugin/121449>\
**Category:** Support\
**Created:** [June 27, 2019, 12:55am UTC](https://meta.discourse.org/t/default-pinned-topic-does-not-show-due-to-policy-plugin/121449 "2019-06-27T00:55:45Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![hellekin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hellekin/32/51636_2.png) [@hellekin](https://meta.discourse.org/u/hellekin)\
**Post date:** [August 18, 2019, 4:58pm UTC](https://meta.discourse.org/t/default-pinned-topic-does-not-show-due-to-policy-plugin/121449/4 "2019-08-18T16:58:54Z")

</div>

I have been tracking down the culprit: `discourse-policy`, as @Vraag suggested. Contrary to @Vraag, the plugin affects the “disappearing” topic even when disabled: having it on the plugin list is enough for the topic to “disappear” when logged-out.

The response making use of the Policy plugin is the first response: [Exploring community-based social media - #2 by system - Share - petites singularités](https://ps.zoethical.org/t/welcome-to-p-s/8/2?u=how)  
The Markdown for that post:

```markdown
[policy group=trust_level_1 reminder=daily]
We do not use third-party cookies.
[/policy]

```

Here’s the error log:

```plaintext
TypeError: p is null
Url: https://ps.zoethical.org/assets/plugins/discourse-policy-60b8413b741df408ff16f757f644f9de7cb64099d24c33dc3d85ef735478d72a.js
Line: 1
Column: 3373
Window Location: https://ps.zoethical.org/t/welcome-to-p-s/8

```

Here’s the backtrace:

```plaintext
r@https://ps.zoethical.org/assets/plugins/discourse-policy-60b8413b741df408ff16f757f644f9de7cb64099d24c33dc3d85ef735478d72a.js:1:3373
m@https://ps.zoethical.org/assets/plugins/discourse-policy-60b8413b741df408ff16f757f644f9de7cb64099d24c33dc3d85ef735478d72a.js:1:5934
value/<@https://ps.zoethical.org/assets/application-e5979c62e7a903663f877b29059ee0b4707ac3d11c783460ad7d0920ed92e017.js:73:2648
value@https://ps.zoethical.org/assets/application-e5979c62e7a903663f877b29059ee0b4707ac3d11c783460ad7d0920ed92e017.js:73:2619
r@https://ps.zoethical.org/assets/vendor-fae393575cd14697b31e9fdbeb8c016d165a8a3af765ec8ca719a454585aedf4.js:5:10297
r@https://ps.zoethical.org/assets/vendor-fae393575cd14697b31e9fdbeb8c016d165a8a3af765ec8ca719a454585aedf4.js:5:10576
r@https://ps.zoethical.org/assets/vendor-fae393575cd14697b31e9fdbeb8c016d165a8a3af765ec8ca719a454585aedf4.js:5:10576
r@https://ps.zoethical.org/assets/vendor-fae393575cd14697b31e9fdbeb8c016d165a8a3af765ec8ca719a454585aedf4.js:5:10576
r@https://ps.zoethical.org/assets/vendor-fae393575cd14697b31e9fdbeb8c016d165a8a3af765ec8ca719a454585aedf4.js:5:10576
r@https://ps.zoethical.org/assets/vendor-fae393575cd14697b31e9fdbeb8c016d165a8a3af765ec8ca719a454585aedf4.js:5:10576
r@https://ps.zoethical.org/assets/vendor-fae393575cd14697b31e9fdbeb8c016d165a8a3af765ec8ca719a454585aedf4.js:5:10576
u@https://ps.zoethical.org/assets/vendor-fae393575cd14697b31e9fdbeb8c016d165a8a3af765ec8ca719a454585aedf4.js:5:12330
r@https://ps.zoethical.org/assets/vendor-fae393575cd14697b31e9fdbeb8c016d165a8a3af765ec8ca719a454585aedf4.js:5:11710
o@https://ps.zoethical.org/assets/vendor-fae393575cd14697b31e9fdbeb8c016d165a8a3af765ec8ca719a454585aedf4.js:5:13433
i@https://ps.zoethical.org/assets/vendor-fae393575cd14697b31e9fdbeb8c016d165a8a3af765ec8ca719a454585aedf4.js:5:13297
r@https://ps.zoethical.org/assets/vendor-fae393575cd14697b31e9fdbeb8c016d165a8a3af765ec8ca719a454585aedf4.js:5:11816
o@https://ps.zoethical.org/assets/vendor-fae393575cd14697b31e9fdbeb8c016d165a8a3af765ec8ca719a454585aedf4.js:5:13433
i@https://ps.zoethical.org/assets/vendor-fae393575cd14697b31e9fdbeb8c016d165a8a3af765ec8ca719a454585aedf4.js:5:13297
r@https://ps.zoethical.org/assets/vendor-fae393575cd14697b31e9fdbeb8c016d165a8a3af765ec8ca719a454585aedf4.js:5:13118
rerenderWidget@https://ps.zoethical.org/assets/application-e5979c62e7a903663f877b29059ee0b4707ac3d11c783460ad7d0920ed92e017.js:33:21229
y</t.invoke@https://ps.zoethical.org/assets/ember_jquery-d430881a3fb1403871256e5a02423c4b20a78793685e92088613ca9a701baf88.js:16:9727
y</t.flush@https://ps.zoethical.org/assets/ember_jquery-d430881a3fb1403871256e5a02423c4b20a78793685e92088613ca9a701baf88.js:16:8732
b</t.flush@https://ps.zoethical.org/assets/ember_jquery-d430881a3fb1403871256e5a02423c4b20a78793685e92088613ca9a701baf88.js:16:10780
H</n._end@https://ps.zoethical.org/assets/ember_jquery-d430881a3fb1403871256e5a02423c4b20a78793685e92088613ca9a701baf88.js:16:15438
H</n.end@https://ps.zoethical.org/assets/ember_jquery-d430881a3fb1403871256e5a02423c4b20a78793685e92088613ca9a701baf88.js:16:12105
H</n._run@https://ps.zoethical.org/assets/ember_jquery-d430881a3fb1403871256e5a02423c4b20a78793685e92088613ca9a701baf88.js:16:15973
H</n._join@https://ps.zoethical.org/assets/ember_jquery-d430881a3fb1403871256e5a02423c4b20a78793685e92088613ca9a701baf88.js:16:15758
H</n.join@https://ps.zoethical.org/assets/ember_jquery-d430881a3fb1403871256e5a02423c4b20a78793685e92088613ca9a701baf88.js:16:12813
c@https://ps.zoethical.org/assets/ember_jquery-d430881a3fb1403871256e5a02423c4b20a78793685e92088613ca9a701baf88.js:12:3338
R/<@https://ps.zoethical.org/assets/ember_jquery-d430881a3fb1403871256e5a02423c4b20a78793685e92088613ca9a701baf88.js:12:4903
h@https://ps.zoethical.org/assets/ember_jquery-d430881a3fb1403871256e5a02423c4b20a78793685e92088613ca9a701baf88.js:2:9935
o/</f<@https://ps.zoethical.org/assets/ember_jquery-d430881a3fb1403871256e5a02423c4b20a78793685e92088613ca9a701baf88.js:2:10240

```

Note that `plugin.rb` loads a whole bunch of dependencies even before doing anything. Maybe the mistake comes from one of these dependencies that would expect a logged-in user.

---

_[View the full topic](https://meta.discourse.org/t/default-pinned-topic-does-not-show-due-to-policy-plugin/121449)._
