Bug #44585

FAL: file properties are not updated

Added by Stefan Froemken over 2 years ago. Updated over 2 years ago.

Status:Resolved Start date:2013-01-16
Priority:Should have Due date:
Assigned To:- % Done:

100%

Category:File Abstraction Layer (FAL) Spent time: -
Target version:-
TYPO3 Version:6.0 Is Regression:
PHP Version:5.3 Sprint Focus:
Complexity:easy

Description

Hello Core-Team,

I have my own FAL-Extension: fal_dropbox: https://github.com/froemken/fal_dropbox/
I create (NOT upload!) a new empty file called: hallo.txt
The new file will be created and listed perfectly. The size of this file is 0 bytes. This information is also added to sys_file.
Now I edit this file and write something in there and save this file.
The file was saved successfully and we return to our filelist.

BUT: The filesize keeps being 0 bytes.

After a long time of debugging I found out following:

In File.php -> Method: mergeIndexRecord() you have:

$this->properties = array_merge($this->properties, $recordData);

In $this->properties we have the correct values (bytes = 141)
In $recordData we have the old values from database.
After merging, the correct values are overwritten with the old values from the database.

Changing the values soved the problem:

$this->properties = array_merge($recordData, $this->properties);

Stefan

Associated revisions

Revision 7d799fb3
Added by Stefan Froemken over 2 years ago

[BUGFIX] FAL: file properties are not updated

The fileproperties are not updated correctly. In
case of this issue it is the filesize which was not
updated in filelist-module

Resolves: #44585
Releases: 6.0, 6.1
Change-Id: I539b6ab94c4f5aa90933302687f0c666953270fa
Reviewed-on: https://review.typo3.org/17569
Reviewed-by: Stefan Froemken
Tested-by: Stefan Froemken
Reviewed-by: Dan Untenzu
Tested-by: Dan Untenzu
Reviewed-by: Wouter Wolters
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack

Revision 90da916c
Added by Stefan Froemken over 2 years ago

[BUGFIX] FAL: file properties are not updated

The fileproperties are not updated correctly. In
case of this issue it is the filesize which was not
updated in filelist-module

Resolves: #44585
Releases: 6.0, 6.1
Change-Id: I539b6ab94c4f5aa90933302687f0c666953270fa
Reviewed-on: https://review.typo3.org/18212
Reviewed-by: Stefan Froemken
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel

History

#1 Updated by Gerrit Code Review over 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17569

#2 Updated by Stefan Froemken over 2 years ago

Funny:

Switching "extended view" to on: filesize is wrong
Switching "extended view" to off: filesize is correct

#3 Updated by Gerrit Code Review over 2 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17569

#4 Updated by Camelia M over 2 years ago

patch 2 works fine for me too on version 6.0.1

#5 Updated by Benjamin Mack over 2 years ago

Could you send it to the 6.0 branch as well?

#6 Updated by Stefan Froemken over 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#7 Updated by Gerrit Code Review over 2 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/18212

#8 Updated by Stefan Froemken over 2 years ago

  • Status changed from Under Review to Resolved

#9 Updated by Gerrit Code Review over 2 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch master_new has been pushed to the review server.
It is available at https://review.typo3.org/18633

#10 Updated by Christian Kuhn over 2 years ago

  • Status changed from Under Review to Resolved

Also available in: Atom PDF