Nil usage errors in un-self-deleting posts


#1

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:


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.


(Kane York) #2

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


#3

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.


#4

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 : \


(Jeff Atwood) #5

Might be easier, yeah.


#6

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


#7

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


(Jeff Atwood) #8

If you think this is a real bug, and not a config issue, can you repro it on 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.


#9

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.


(Jeff Atwood) #10

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.


#11

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.


(Jeff Atwood) #12

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

But you can delete posts / replies


#13

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


(Jeff Atwood) #14

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


#15

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.


(Jeff Atwood) #16

No repro

That’s me creating a new user there on 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.


#17

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.


(Kane York) #18

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

Meta’s SSL certificate should be signed by Comodo.


#20

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


(Kane York) #21

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 :slight_smile: