jmcameron / attachments

Attachments Extension for Joomla 3, 4, and 5
GNU General Public License v3.0
12 stars 19 forks source link

in frontend: strange behaviour #9

Closed jojo12 closed 1 month ago

jojo12 commented 7 years ago

When logged in in frontend as superuser and , clicking on attachment in a content: I get the notice: Warning!Really delete attachment?( mypdf.pdf ), saying yes, it deletes.

When logged in as registered, the download works perfectly.

Using Joomla! 3.6.2 and latest joomla attachment 3.2.4 on php 7.0.9 EDIT: meanwhile Joomla* 3.6.4 but problem persists.

jojo12 commented 7 years ago

it's a pity: it seems no others can reproduce this problem and there is no answer more than 5 months after.

seb-vial commented 7 years ago

Same issue here...

Actually the edit and delete buttons are wrongly placed in the page... In my case, they're placed on top of the whole page, which means wherever I click as superuser or writer it will ask me if I want to delete the file attached. It seems the issue come from CSS; both buttons (a link inside td with class at_edit) have the class modal, this class sets the element with a position fixed, a big z-index to put it above all other element and fits all the page with top, bottom, left and right at 0.

In my opinion the edit and delete button should not have the modal class only modal-button as they're simply triggers.

image

Here is what I did as a tmp fix:

I added this CSS inside my theme Custom Code:

div.attachmentsList table td.at_edit a.modal-button {
    position: static;
}
jojo12 commented 7 years ago

Thanks, I just thought, this page is dead. I will try.

seb-vial commented 7 years ago

I don't know if this github is dead, I actually got to this issue by Googling the symptoms...

jojo12 commented 7 years ago

I fixed it (temporarely or as template override) searching in: /httpdocs/components/com_attachments/views/attachments/tmpl/default.php for "modal-button modal" and omitted the "modal". This is 2 times (one for edit, one for delete). I saved and it works. Thank you very much!!!

seb-vial commented 7 years ago

Nice ;) I couldn't change the source code as I don't have access to it right now, but someone should probably make a PR with that change so it could be included in a future update

jmcameron commented 7 years ago

Yes. I've removed the 'modal' from the class for the edit/delete buttons on lines 307 and 319. I have not released it yet, but I've given it to several people who asked about this. You can test a stable pre-release version here:

attachments-3.2.5-Beta1.zip

I will try to do a release soon. Life has been a bit busy and I have not had time to deal with this yet. Thanks for your patience.

-Jonathan (author of Attachments)

P.S. You should be able to install this over any existing version of Attachments. Back up first!

seb-vial commented 7 years ago

Thank you !

jmcameron commented 7 years ago

Feel free to contact me via the email at the end of the help page (in the Attachments manager in the back end).

-Jonathan

jmcameron commented 6 years ago

If anyone is interested, here is another version to test:

http://jmcameron.net/attachments/downloads/attachments-3.2.6-Beta4.zip

-Jonathan

parapente commented 1 month ago

Closing as this issue is for an older version of the extension. If the issue is still present feel free to reopen.