# Nil usage errors in un-self-deleting posts

**URL:** https://meta.discourse.org/t/nil-usage-errors-in-un-self-deleting-posts/26066
**Category:** Support
**Created:** [March 6, 2015, 1:04pm UTC](https://meta.discourse.org/t/nil-usage-errors-in-un-self-deleting-posts/26066 "2015-03-06T13:04:20Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![meke](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@meke](https://meta.discourse.org/u/meke)
#### Post date: [March 6, 2015, 1:04pm UTC](https://meta.discourse.org/t/nil-usage-errors-in-un-self-deleting-posts/26066/1 "2015-03-06T13:04:20Z")

</div>

Hello again! Good experience so far.  
but…  
I am attempting to delete posts that I have made as an admin. I am logged in as the admin, I click the trashcan button and the post turns red. Then I navigate back to the category listing and the post is still there, then I open up a private window and check with a non logged in instance: the post is still present. I go back to the post and the trashcan icon is still present. I then check the logs and see that no action was taken. If I go into the posts and click delete/undelete/delete nothing seems to happen.

I did perform a subdomain change and followed the guide here:

> [@Change the domain name or rename your Discourse](https://meta.discourse.org/t/change-the-domain-name-or-rename-my-discourse/16098):
>
> bookmark This guide explains how-to change the domain name of your Discourse site, and includes information about setting up DNS changes, editing configuration files, updating site settings, and correcting social logins and post content to reflect your new domain name. warning This guide is for self-hosted Discourse instances that were installed using our [installation guide on GitHub](https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md). If you are [hosted by Discourse](https://www.discourse.org/pricing), please see [Configure your domain name for hosted Discourse](https://meta.discourse.org/t/configure-your-domain-name-for-hosted-discourse/21827) for specific …

with no errors.

Am I experiencing normal behavior? I saw references to scheduled job to do post cleanup, but I don’t see any reference to it in the admin panel. Suggestions? I can try destroying the container and site content and trying again as this is a new container.

I should add that I gave myself moderator privilege in the admin panel as well as gave full trust (4).

Ok another update. If I flagged my own post for another reason, then handled the post through the pm, I was able to delete it. I tried this with another post, but flagging it as off-topic. The off-topic flag didnt show up in the flag inbox for that post. I tried to undo the flag and the flag will not be removed.

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [March 6, 2015, 6:54pm UTC](https://meta.discourse.org/t/nil-usage-errors-in-un-self-deleting-posts/26066/2 "2015-03-06T18:54:37Z")

</div>

Does anything show up in /logs when you click the button?

---

<div class="post-metadata">

### Author: ![meke](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@meke](https://meta.discourse.org/u/meke)
#### Post date: [March 7, 2015, 1:43am UTC](https://meta.discourse.org/t/nil-usage-errors-in-un-self-deleting-posts/26066/3 "2015-03-07T01:43:06Z")

</div>

I didn’t see a quick way to export these… but… try this out. Everything in red happened close in time to the deletion requests, but not immediately following and do not follow the attempts to delete. The undefined method ‘’ I believe comes when trying to remove the flag from the post in question.

 ![](https://global.discourse-cdn.com/meta/original/3X/a/b/abd4b79a99dab8b69fcae9b9de6e1643062c90dd.png)

---

<div class="post-metadata">

### Author: ![meke](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@meke](https://meta.discourse.org/u/meke)
#### Post date: [March 7, 2015, 3:31am UTC](https://meta.discourse.org/t/nil-usage-errors-in-un-self-deleting-posts/26066/4 "2015-03-07T03:31:13Z")

</div>

Do you think i should just scrap this container and start over, see what happens? Deleting a post seems like an important thing to have happen in a live scenario : \

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [March 7, 2015, 3:53am UTC](https://meta.discourse.org/t/nil-usage-errors-in-un-self-deleting-posts/26066/5 "2015-03-07T03:53:12Z")

</div>

Might be easier, yeah.

---

<div class="post-metadata">

### Author: ![meke](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@meke](https://meta.discourse.org/u/meke)
#### Post date: [March 7, 2015, 4:06am UTC](https://meta.discourse.org/t/nil-usage-errors-in-un-self-deleting-posts/26066/6 "2015-03-07T04:06:32Z")

</div>

Ok thanks, I could leave it up to help you guys troubleshoot the cause, but I wouldn’t know where to start.

---

<div class="post-metadata">

### Author: ![meke](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@meke](https://meta.discourse.org/u/meke)
#### Post date: [March 7, 2015, 10:05am UTC](https://meta.discourse.org/t/nil-usage-errors-in-un-self-deleting-posts/26066/7 "2015-03-07T10:05:54Z")

</div>

Ok… so I think I narrowed down this bug a bit more. I bootstrapped a new instance altogether and the bug persisted. When viewing a thread directly, clicking the delete button has 0 effect from any panel, either through the ellipse expansion or through the wrench button provided at the top of the page or the bottom. The post simply will not be deleted from an admin on their own post or from an admin on another users post, but it will turn the post red and not reload the page or perform any other action. If you go to the modal view, or the category listing view, and click the topic button and select the post directly, from there you can click the wrench to the side of the panel and delete the post with the desired result of the post disappearing.

I would like to mention that if you click the checkbox next to a post, the bulk select icon will be displayed, but if your window view is too small the icon will be unclickable as it appears below the layers of the list area div. I changed the .btn style to have a z-index: 0 and a margin: 0 and it looks fine without breaking the functionality of the activity sort button. Not really sure what you are guys are looking for in the push of code changes, so I won’t goof with the github : P

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [March 7, 2015, 10:09am UTC](https://meta.discourse.org/t/nil-usage-errors-in-un-self-deleting-posts/26066/8 "2015-03-07T10:09:38Z")

</div>

If you think this is a real bug, and not a config issue, can you repro it on [http://try.discourse.org](http://try.discourse.org) ? If you can, list the steps.

I just deleted a few of my posts there on try, and I am an admin, and had no issue. The posts deleted.

---

<div class="post-metadata">

### Author: ![meke](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@meke](https://meta.discourse.org/u/meke)
#### Post date: [March 7, 2015, 10:24am UTC](https://meta.discourse.org/t/nil-usage-errors-in-un-self-deleting-posts/26066/9 "2015-03-07T10:24:38Z")

</div>

I’m probably not the sharpest tool in the toolbox… but don’t I need admin privileges to delete posts on try? My config is pretty much unchanged from what comes out of the git repository, except for the desired fields of course. The second attempt at getting this going was without mucking about in the admin fields at all. What is supposed to happen after you delete a post from the post view… the post turns red and then the page should reload? As it stands, it highlights, produces a garbage can… and… I looked all around for a confirmation button but was unable to find one. Oh and it produces the nil error in the console when attempting to untoggle the delete. I might just be missing the last step to confirm the delete. In which case I’ll blush all day long.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [March 7, 2015, 10:27am UTC](https://meta.discourse.org/t/nil-usage-errors-in-un-self-deleting-posts/26066/10 "2015-03-07T10:27:22Z")

</div>

Nope, users can delete their own posts if they want to.

There is a 24 hour “intent to delete” message displayed first, then the delete happens. Unless the post is flagged in that time period.

---

<div class="post-metadata">

### Author: ![meke](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@meke](https://meta.discourse.org/u/meke)
#### Post date: [March 7, 2015, 10:28am UTC](https://meta.discourse.org/t/nil-usage-errors-in-un-self-deleting-posts/26066/11 "2015-03-07T10:28:52Z")

</div>

I probably don’t have the trust level, I had to create an account just now under the user rogosher (testing github). I have no option to delete : )

Ah ok I posted in uncategorized. I got the correct message in a reply to another thread, let me test this function in my deployment.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [March 7, 2015, 10:41am UTC](https://meta.discourse.org/t/nil-usage-errors-in-un-self-deleting-posts/26066/12 "2015-03-07T10:41:25Z")

</div>

You can’t delete a topic, that would delete everyone’s posts to the topic as well.

But you can delete posts / replies

---

<div class="post-metadata">

### Author: ![meke](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@meke](https://meta.discourse.org/u/meke)
#### Post date: [March 7, 2015, 10:43am UTC](https://meta.discourse.org/t/nil-usage-errors-in-un-self-deleting-posts/26066/13 "2015-03-07T10:43:28Z")

</div>

Yeah I went ahead and found where you made a test post. I got the message about deletion, but upon refreshing the page my message still shows up. Same with your test post I believe. I tried this behavior on my test deployment to the same effect. I also tried deleting the test topic I made as an admin and the post was not pruned.

[http://try.discourse.org/t/new-trends-in-technology/320](http://try.discourse.org/t/new-trends-in-technology/320)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [March 7, 2015, 11:45am UTC](https://meta.discourse.org/t/nil-usage-errors-in-un-self-deleting-posts/26066/14 "2015-03-07T11:45:38Z")

</div>

Correct, as a regular user on try your post deletion will appear with the notice stub for 24 hours until it is deleted.

---

<div class="post-metadata">

### Author: ![meke](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@meke](https://meta.discourse.org/u/meke)
#### Post date: [March 7, 2015, 11:57am UTC](https://meta.discourse.org/t/nil-usage-errors-in-un-self-deleting-posts/26066/15 "2015-03-07T11:57:54Z")

</div>

The notice stub was not present after deleting the post and a refresh, it just displayed the original post and offered the option to delete it again via the trashcan icon.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [March 7, 2015, 12:38pm UTC](https://meta.discourse.org/t/nil-usage-errors-in-un-self-deleting-posts/26066/16 "2015-03-07T12:38:20Z")

</div>

No repro

 ![](https://global.discourse-cdn.com/meta/original/3X/2/6/26573eafb859fae3778a5fbd4e82d1df5c2ed07a.png) 

That’s me creating a new user there on [try.discourse.org](http://try.discourse.org), posting, and deleting my post.

I suspect you have rogue browser extensions that are interfering with the Discourse JavaScript (and Discourse is a JavaScript app). Try a different browser, one you do not normally use, or try in [safe mode](https://meta.discourse.org/t/53504?silent=true).

---

<div class="post-metadata">

### Author: ![meke](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@meke](https://meta.discourse.org/u/meke)
#### Post date: [March 7, 2015, 12:51pm UTC](https://meta.discourse.org/t/nil-usage-errors-in-un-self-deleting-posts/26066/17 "2015-03-07T12:51:42Z")

</div>

I went ahead and installed chrome to test it out, no such luck, same behavior. But! using chrome reminded me I had forgotten that a certain ISP was attempting to alert me of a certain condition regarding my account and copyrights via an in browser pop up, which I had been blocking the content of. I had not seen any odd behavior related to it up to this point, but that perhaps is what is causing the interference in the JS. I guess I will resolve that with said ISP and see if the behavior changes, or test from another connection.

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [March 7, 2015, 5:50pm UTC](https://meta.discourse.org/t/nil-usage-errors-in-un-self-deleting-posts/26066/18 "2015-03-07T17:50:32Z")

</div>

Here’s a question: Does it happen on a Discourse site with SSL, like meta?

Meta’s SSL certificate should be signed by Comodo.

---

<div class="post-metadata">

### Author: ![meke](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@meke](https://meta.discourse.org/u/meke)
#### Post date: [March 7, 2015, 8:38pm UTC](https://meta.discourse.org/t/nil-usage-errors-in-un-self-deleting-posts/26066/20 "2015-03-07T20:38:10Z")

</div>

Good call @riking this only seems to happen for myself on https instances of discourse.

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [March 7, 2015, 8:57pm UTC](https://meta.discourse.org/t/nil-usage-errors-in-un-self-deleting-posts/26066/21 "2015-03-07T20:57:22Z")

</div>

On plain HTTP, you mean, and not HTTPS, because it worked here.

So you have a proxy messing with your web traffic. Go fix that 🙂

[Next page](https://meta.discourse.org/t/nil-usage-errors-in-un-self-deleting-posts/26066.md?page=2)
