Project

General

Profile

Actions

Bug #17897

closed

Filenames ending with a number confuse TYPO3s renaming/instancing system

Added by Sacha Vorbeck over 16 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2007-12-07
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
5.1
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

While creating an Advent calendar I upload 24 .swf files to a fileadmin folder. The files where named xmas_01.swf - xmas_24.swf. Then I included the files into 24 multimedia-content elements.

Some of the flash files had to be changed later on and were re-uploaded and then re-included in the content elements again. When including e. g. xmas_04.swf, TYPO3 renamed the file in the uploads/media folder to xmas_25.swf etc. and displayed the wrong content in the frontend.

Summary: the instancing systems gets confused if editors upload and include files ending with "_xx.ext".

(issue imported from #M6910)

Actions #1

Updated by Andreas Wolf over 12 years ago

  • Category set to Backend API
  • Status changed from New to Accepted
  • Assignee set to Andreas Wolf
  • Target version deleted (0)

Yeah, that's a feature of the file handling code - there is code in t3lib_basicFileFunc to strip these numeric suffixes because they are seen as the suffixes that are added for duplicate files. My only advise is to use a different scheme for naming (leave out the _ or use a dash instead).

I guess we will not remove this functionality, but maybe we can incorporate a better solution into the File Abstraction Layer that is currently being developed.

Actions #2

Updated by Alexander Opitz over 9 years ago

  • Status changed from Accepted to Needs Feedback
  • Is Regression set to No

Hi,

as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (6.2.7)?

Actions #3

Updated by Riccardo De Contardi about 9 years ago

My test, performed on TYPO3 CMS 6.2.10:

1) uploaded

photo_01.png
photo_02.png
photo_03.png
photo_04.png
photo_05.png

in /fileadmin/Images/ using FileList Module

2) created 5 CE images in a page, each with one image; for each I used "add Image" because they already were in /fileadmin/Images

please take note that inspecting the HTML source in the FE, the images path are either the original /fileadmin/images or /fileadmin/_processed_ if some processing took place (e.g. scaling for exceeded maximum width)

3) I created 2 other images: photo_01.png and photo_02.png to replace the corresponding images previously uploaded.

3) edit the first CE inserted in the page > Images Tab > "Select and Upload File" > I selected "photo_01.png" > Javascript Alert: "Shall the existing file be overwritten?" > It does not matter what I answer at this point, because the file will be uploaded into /fileadmin/user_uploads or in the processed folder with a random generated name

4) I uploaded photo_02.png in filelist module > Javascript Alert: "Shall the existing file be overwritten?" > If I answer "OK" the original file is overwritten, and in FE the file has changed (even if it has been processed)
NOTE: if I answer "cancel" the file is not uploaded at all! (No unique filename available in "/Images/"!Upload of file "photo_03.jpg" failed!)

5) Again, edit the first CE inserted in the page > Images Tab > "Select and Upload File" > I selected ANOTHER "photo_01.png" > Javascript Alert: "Shall the existing file be overwritten?" > Answering yes, the file uploaded at point 3) is actually replaced, but there is a problem: the list (IRRE list, right?) of the images shows it amongst the existing files, so it seems there are THREE different "photo_01.png" related to the CE; to load the correct list, simply save the element,exit and edit again.
So, the problem is: the IRRE is not updated.

I think there are also some strange behaviors of the processed files, but I must investigate further

Is this test exhaustive,or am I forgetting something?

Actions #4

Updated by Alexander Opitz almost 9 years ago

  • Category changed from Backend API to File Abstraction Layer (FAL)
  • Status changed from Needs Feedback to New
  • Target version set to 7.5
Actions #5

Updated by Benni Mack over 8 years ago

  • Target version changed from 7.5 to 7 LTS
Actions #6

Updated by Mathias Schreiber over 8 years ago

  • Status changed from New to Resolved

use "replace file" on current master

Actions #7

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF