Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
uomopalese
Topic Author
Posts: 3
Joined: 09 Oct 2024, 06:34

Assigning the same name of an image to another in the same gallery resulted in the image being deleted

09 Oct 2024, 09:01

As explained in the title, if the name of an image in the gallery is changed to the name of an image already present, that image will be deleted. 
Is this the expected behavior or is it a bug? Wouldn't it be better to show a message saying "name already in use"? Or better to leave the possibility of having multiple images with the same name (on the frontend)
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14143
Joined: 30 Sep 2006, 03:37

Re: Assigning the same name of an image to another in the same gallery resulted in the image being deleted

09 Oct 2024, 23:03

Hi. I wasn't aware if this, but it looks like this is how it works yes. You may want to look into the Files Gallery application, which is included with X3 for free, and is much more powerful in terms of file management. This application will also be the base of future X3 panel.
https://demo.photo.gallery/files/ guest/guest
https://www.photo.gallery/docs/plugins/files-gallery/
uomopalese wrote:Or better to leave the possibility of having multiple images with the same name (on the frontend)
This is not possible. Although Windows may allow multiple files with the same names in different cAsE (eg Image.jpg and image.jpg), Mac and Linux (most servers) do not. Besides, you shouldn't really be renaming files to create your "captions" when you can create titles and descriptions for images with better character support and html.

Image
 
User avatar
uomopalese
Topic Author
Posts: 3
Joined: 09 Oct 2024, 06:34

Re: Assigning the same name of an image to another in the same gallery resulted in the image being deleted

10 Oct 2024, 03:27

HI, thanks for your answer.
I'm looking for an alternative to  my (old, but still working) Koken app for my photo/paintings website. I'm testing X3 on local (I'm a web developer)
About my post, I have to add that when the image is deleted, you still have that image showing in the front-end, while the new one is showing in the back end, i guess because is cached.

EDIT: btw cleaning the browser cache didn't solve.

Image
Image
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14143
Joined: 30 Sep 2006, 03:37

Re: Assigning the same name of an image to another in the same gallery resulted in the image being deleted

10 Oct 2024, 08:54

uomopalese wrote:About my post, I have to add that when the image is deleted, you still have that image showing in the front-end, while the new one is showing in the back end, i guess because is cached.

EDIT: btw cleaning the browser cache didn't solve.

Image
Image
Well, it's simply not possible to have TWO images stored in the exact same url path. Something with cache, I can't tell from here. If you had a public link, I could diagnose for you. In your screenshot, I see "old image (same name)", but where is the "new image (same name)" then? The small thumbnail in the panel could be resize-cache (unrelated to browser cache).

It's probably not correct behavior that it would overwrite existing images without warning. But it definitely overwrites the image. You can't have two images stored in a single path/to/filename.jpg. One is there, one is not.
 
User avatar
uomopalese
Topic Author
Posts: 3
Joined: 09 Oct 2024, 06:34

Re: Assigning the same name of an image to another in the same gallery resulted in the image being deleted

12 Oct 2024, 08:09

Hi, thank you for your answer :)
I perfectly understand what you mean: there can't be two different images linked to the same URL, this is simply no possible.
Also my bad: I incorrectly confused the new image with the old image, now they are correct.
The issue is that the icon in the gallery panel seems to be linked permanently to the old image (the link is correct, it lead to the new one).
I tried to delete the image and to upload a new one, but as soon as i put the name back the icon becomes the wrong one :(

Regarding the issue of images with the same name, as a painting/photography enthusiast I have to say that there could be a case where I wanted to give the same name to two different images, for example two self-portraits that I will call "self-portrait" or two landscapes that I will simply call "landscape". I would like to avoid calling them "self-portrait-1, self-portrait-2..." and so on. In the images I attach you can see how the case is handled by my old application, which unfortunately I have to abandon: the names of the images in the caption are the same, but the application takes care of changing the URL of the two resources by itself. It could be a nice improvement for this gallery too, maybe I can bring it up as a feature request :)

That said, thanks again for your time and kindness.

Image
Image
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14143
Joined: 30 Sep 2006, 03:37

Re: Assigning the same name of an image to another in the same gallery resulted in the image being deleted

12 Oct 2024, 19:47

uomopalese wrote: I tried to delete the image and to upload a new one, but as soon as i put the name back the icon becomes the wrong one :(
This may be a combination of resize cache on server and browser cache, and you may need to clear both. Clean resize cache from Panel > Tools > Cache.

Image
uomopalese wrote:Regarding the issue of images with the same name, as a painting/photography enthusiast I have to say that there could be a case where I wanted to give the same name to two different images, for example two self-portraits that I will call "self-portrait" or two landscapes that I will simply call "landscape". I would like to avoid calling them "self-portrait-1, self-portrait-2..." and so on. In the images I attach you can see how the case is handled by my old application, which unfortunately I have to abandon: the names of the images in the caption are the same, but the application takes care of changing the URL of the two resources by itself. It could be a nice improvement for this gallery too, maybe I can bring it up as a feature request :)
This is not logical.
  • File names are NEVER identical. Check your local file system.
  • How would you identify the images used for what on your website if all image names were the same?
  • As for your old Koken application, it stores file names as hashes like "90982315134.jpg" etc, but it will display only the texts that you made when adding the galleries and photos. Koken stores everything in a database.
  • Likewise with X3, it will only display the actual file name if you don't create a title or description for the image. It seems you did not read my previous post:
mjau-mjau wrote:Besides, you shouldn't really be renaming files to create your "captions" when you can create titles and descriptions for images with better character support and html.

Image
So in the above case, you can create title "landscape", "landscape" and "landscape" captions for your images for display. In the background, the images will of course still have different names, which logically would be required to identify them when editing. The fact that X3 retains your original image name in the SRC, is also better for SEO (search engine optimization). Anyway, it's not possible to have identical file names in the same folder, not in any app or file system. When editing the DISPLAY caption, you may of course use identical text or whatever you like.