modxcms / Discuss

MODX Revolution native forums.
19 stars 35 forks source link

files can't be deleted while modifying posts #39

Open bvandorp opened 7 years ago

bvandorp commented 7 years ago

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

Nuan8 commented 7 years ago

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

bvandorp commented 7 years ago

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.

Nuan8 commented 7 years ago

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

bvandorp commented 7 years ago

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 ;)

Nuan8 commented 7 years ago

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.