JoomGalleryfriends / JG4-dev

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

[FileManager service] Problem with images including a dot in the filename #68

Closed AlexanderSupp closed 1 year ago

AlexanderSupp commented 1 year ago

Please, can somebody test this! In my tests, Original, Detail and Thumbnail were created successfully. But in Tab “Images”, no image will find.

szepty-ziemi commented 1 year ago

Hi, Alexander, to which PR your request apply? Or you mean main branch?

AlexanderSupp commented 1 year ago

Yes, it is the main branch.

It's difficult and depends not only on the dot in the image title. In fact, there are no dots in the File Names but in the SQL-Table. See Screenshot 2023-01-18 125105.jpg I tried it with different versions of the same photo. Maybe the EXIF data or the image sizes are different. I will continue the tests with deeper analysis. Screenshot 2023-01-18 125105

szepty-ziemi commented 1 year ago

Interesting... there are two files that have letters in names "jp" and "hq". The second is okay in DB but the one with "jp" has dot... May it be because jp is close enough to jpg and treated as such?

Nevertheless I wasn't able to replicate the issue:

obraz

obraz

obraz

Maybe any specific setting are needed?

Do you have enabled Nubering to YES:

![Uploading obraz.png…]()

AlexanderSupp commented 1 year ago

Thanks for the hint. I've now tested both. Numbering yes/no. It's not because of that.

MrMusic commented 1 year ago

I suspect the problem with the missing images is because you are trying to upload to a subdirectory. Probably there is a problem with the directory structure, maybe it is related to this problem: https://github.com/JoomGalleryfriends/JG4-dev/issues/44
As long as this is not solved, you should only work in the top category level. Furthermore, the created file name depends on whether 'Original filename' is activated in the configuration or not. Although this option is intended for setting the image title in the mass upload, it also plays a role here.

AlexanderSupp commented 1 year ago

In my case, it was not the directory. File Name in the DB Table was: 20160316162440.jp_20230118_1788119348.jpg File Name in the Directory was: 20160316162440jp_20230118_1788119348.jpg The “.” was the problem. I changed the DB-Table and everything works.

AlexanderSupp commented 1 year ago

"Original filename" in my Global Configuration is marked red and set to no.

AlexanderSupp commented 1 year ago

Blumenmer

Today I was able to reproduce this bug with the photo above. Details of my config are here.

DS214Play-20230131-Joomla-Installation.txt

I got the same result with WampServer. Can somebody try this with my picture and config. Image processing with GD Lib. Image Title "Blumenmer.jpg-20230131" (look at dot).

Screenshot 2023-01-31 175307 Screenshot 2023-01-31 175344 Screenshot 2023-01-31 175418 Screenshot 2023-01-31 175436

Tested with current main branch on my Synology. Same result on my Wampserver-PC.

MrMusic commented 1 year ago

Can somebody try this with my picture and config.

Confirmed! There is a problem when dots '.' are entered in the image title: Everything that comes after the last dot is interpreted as a file extension, but only in the database, not in the filesystem itself. @Elfangor93 The function cleanFilename in Filesystem.php ?

Elfangor93 commented 1 year ago

Fixed in PR https://github.com/JoomGalleryfriends/JG4-dev/pull/86