jmcameron / attachments

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

correction for Blank page in popup after adding file #41 #46

Closed JLTRY closed 2 months ago

JLTRY commented 2 months ago

correction for Blank page in popup after adding file #41

JLTRY commented 2 months ago

@parapente do you agree to merge. I corrected the blank page issue I changed also some version to 4.0.1 If merged I will provide a relase 4.0.1

parapente commented 2 months ago

@JLTRY When applying the patch the situation seems to be worse than before. In the frontend, without the patch, when you are editing an article, the attachment list is updated correctly when adding a new file. Using the patch, the attachment list isn't updated without reloading the page. I think it needs some more work to fix it correctly but you are on the right track.

As it is without your changes the only thing that doesn't work correctly is when you don't edit the article and try to just add a new attachment. For some reason after uploading the file the form isn't reloaded and remains blank. Also please see the comments I added above to the code. I will try to have a look at it tomorrow morning.

JLTRY commented 2 months ago

@parapente you are right the attachment list is no more updated. I will check again the correction. To be noticed that this issue was present since the beginning !!! For instance on my joomla 3.x site it is also present . The blank page is due to the exit() line in file attachments_component\site\src\Controller\DisplayController.php, function save() . The main idea of the correction is to redirect to the initial upload url , and move the refresh part in the template of Upload. For an unknown reason it worked on my local tests and not on the final commit when I removed my traces. I will check again.

JLTRY commented 2 months ago

@parapente your correction is better