[TYPO3-extbase-kickstarter] Problems with field types image and file when creating records in the backend

Christian Kirchhoff k-risc at gmx.net
Thu Jun 27 17:37:37 CEST 2013


Hello,

I work with TYPO3 6.0.2 and extension builder 2.5.2. So far I mostly created extensions that use models with simple properties (meaning, those without "*")

For a new extension I'd like the backend user to be able to select an image out of the fileadmin folder. So I set the property type of that specific property to "image".

Selecting an image works fine, but: When I add a new record and I reference an image that I already refernced in another record, and when I save this new record, then the image name gets a numbered suffix. So for example "image-name.gif" becomes "image-name_01.gif".

Even more, if I edit this record, delete the reference to "image-name_01.gif", add the image "image-name.gif" again via the "Browse for files" function, and save the record again, the image name becomes "image-name_02.gif". Etc. pp.

The fact that the image name is stored without any path information is not so important in my case. But the suffix appended to the file name is kind of akward. As the hint for "*" properties says there is no special support for them in the front end. Basically it is just a string field.

So yes I can delete the suffix in the controller, I just think that it is kind of confusing for editors working in the backend cause they might think that those files with the numbered suffixes are actually really created.

I also changed the type of the property to "file", but then when I open the browse for files dialog, it always shows "No files found" regardless which folder and regardless of what's actually in it. The filter is set to "*" (with "PHP" excluded. So it should show all other files.

I am not sure of these are problems caused by the extension builder. But If I insert a content element of type "Images" in a page and use the "Add Image" function there, the same browse for files dialog is opened, I can choose an image, it get's rendered to a thumbnil, but when I save it the file names are not changed, even if they are duplicate.

Is the attachment of a numbered suffix to duplicate images wanted behaviour in the extension builder?

Can I switch it off somehow?

Best regards

Christian


More information about the TYPO3-project-extbase-kickstarter mailing list