JoomGalleryfriends / JG4-dev

Development repository for JoomGallery v4.x
GNU General Public License v3.0
10 stars 7 forks source link

Fix issue: Image record saved if error during imagetype creation #178

Closed Elfangor93 closed 8 months ago

Elfangor93 commented 8 months ago

This is a fix for issue #101 .

New image records will not get saved anymore if there was an error during image creation.

AlexanderSupp commented 8 months ago

Whatever I do, Image Magick works and GD not. It shows me a blank screen. I tested GD with and without limitations. Size = 2, 8, zero. And I saw also a blank screen.

01-BlankScreen-2MB-GD-Screenshot 2024-01-15 200336

Screenshot 2024-01-15 200635

Screenshot 2024-01-15 202715

Elfangor93 commented 8 months ago

Whatever I do, Image Magick works and GD not. It shows me a blank screen.

@AlexanderSupp I am pretty sure this behavior is not related to the changes in this PR.

rowi68 commented 8 months ago

I have tested this PR ✅ successfully. After uploading new image with an error during image creation (too big size) it will not get saved anymore.

But i noticed that I got an error with a picture size of 6MB although the limit is set to 10 MB.

2024-01-20_14h01_22

2024-01-20_13h58_16

If I set the maximum size on 15MB, then picture will accepted.

AlexanderSupp commented 8 months ago

A second test performed from a scratch system. Deinstalled JG. Checked DB-Tables, found xue7e_joomgallery_users_old_old_old, deleted this table. Download JG4-dev-image-rollback at 20.01.2024 16:31 Installation OK. Language German. Upload without any changes of the defaults. Image size, 1402.86 KB / 1.33 MB, works correct. Set max MB to 1 Upload same image, Error messages comes up, looks fine and is correct, because image too big. Set max MB to 2 Upload same image, Error messages comes up, looks fine and is correct for me, because image size near a border. Set max MB to 3. Upload same image, No error messages, everything works fine. Now I changed the parameter "Show warning" to "Yes, with hint". Max MB are still to 3. Upload an image of 7 MB. On a new, separate tab, the following occur:

Screenshot 2024-01-20 170617

I didn't remember exactly my parameters of the first test. I hope this test can reproduce the result from somebody.

MrMusic commented 8 months ago

I have tested this item ✅ successfully. Thank you very much.

Elfangor93 commented 8 months ago

But i noticed that I got an error with a picture size of 6MB although the limit is set to 10 MB.

@rowi68 Since we are using com_media's (Media Manager) filesystem plugins for the filesystem handling this error is coming from com_media and is not related to JoomGallery. Therefore this issue would need to be reported at the Joomla core. https://github.com/joomla/joomla-cms

Elfangor93 commented 8 months ago

I didn't remember exactly my parameters of the first test. I hope this test can reproduce the result from somebody.

@AlexanderSupp I am pretty sure, this issue is more general and will not be solved within this PR. Please open a separate issue for that.

rowi68 commented 8 months ago

But i noticed that I got an error with a picture size of 6MB although the limit is set to 10 MB.

@rowi68 Since we are using com_media's (Media Manager) filesystem plugins for the filesystem handling this error is coming from com_media and is not related to JoomGallery. Therefore this issue would need to be reported at the Joomla core. https://github.com/joomla/joomla-cms

I only noticed it and was not sure it would be interesting for you. From my side it is not very important, because I usually never use pics of this size... :-)

AlexanderSupp commented 8 months ago

I only noticed it and was not sure it would be interesting for you. From my side it is not very important, because I usually never use pics of this size... :-)

Yes, that is my understanding too. I'm testing PR here and I don't actually have any problems with it. And in doing so, I run into further issues that I can no longer even assess. How should I open an issue that I can't properly define in the title?

MrMusic commented 8 months ago

When creating an image, the wrong file size (default value from image.xml) is displayed, which is probably also causing confusion. Normally the value from com_media should be displayed here, analogue to the display in the configuration. Otherwise I have not noticed any problems.

DE: Beim erstellen eines Bildes wird die falsche Dateigröße (Default-Wert aus der image.xml) angezeigt, vermutlich sorgt das auch für Verwirrung. Normalerweise sollte hier der Wert aus com_media stehen, analog zur Anzeige in der Konfiguration. Ansonsten konnte ich keine Probleme feststellen. new_image_filesize

Elfangor93 commented 8 months ago

When creating an image, the wrong file size (default value from image.xml) is displayed, which is probably also causing confusion.

This is not related to this PR. Please open a separate issue for that if you want that to be changed.