Discuss icon indicating copy to clipboard operation
Discuss copied to clipboard

files can't be deleted while modifying posts

Open bvandorp opened this issue 9 years ago • 5 comments

Clicking the "X" behind the file won't trigger deletion of the current nor returns any error.

schermafbeelding 2016-10-11 om 16 14 58

bvandorp avatar Oct 11 '16 14:10 bvandorp

Where is this happening? In a thread you can open the thread and delete any part of it I believe

Nuan8 avatar Oct 17 '16 20:10 Nuan8

It is not while modifying a thread but while modifying an post.

So while modifying a post you should be able to delete attached files by clicking the X behind the filename on the bottom of the post. But nothing happens.

bvandorp avatar Oct 18 '16 09:10 bvandorp

Hmm you are right. Originally i had some javascript problems, but i fixed all of them (I thought).

Here is what I can see from the dev tools: <a href="javascript:void(0);" class="dis-remove-attachment">X</a> That href seems...wrong somehow

Nuan8 avatar Oct 20 '16 14:10 Nuan8

Well i figured it should throw in an error if something javascript related would go wrong. I'll try to figure out where it goes wrong exactly, i'll be back ;)

bvandorp avatar Oct 21 '16 07:10 bvandorp

I am not very tech savvy but i have dug into Discuss fairly deeply.

I compared the link to another link (add attachment in reply area) and the javascript link looks the same, so that's not meaningful I guess.

My thinking is there may be a template file that could be edited. Otherwise you have to dig deeper, that's tough. Its weird because the javascript link now looks pretty much ok, so why wouldn't it work.

Tell me your thinking when you can, but i don't have time at the moment to dig deeper, sorry to say ~~ Thinking more, wouldn't it be a small tpl file which is giving the call to the java in the html structure, in other words the code to say hey java do this function here. If so its just a matter of finding the tpl file. As you may know this is how Discuss is structured, and while its a bit of a mess it does give fine levels of control as a result. That's def how this little line in the html is created, not some sort of automatic thing but a small tpl with the html and then the java function and css styling attached by class, generally.

Nuan8 avatar Oct 22 '16 21:10 Nuan8