Bug #49538

No references displayed in filelist for "internal_type" -> "file_reference" TCA fields

Added by Martin Borer about 2 years ago. Updated over 1 year ago.

Status:Resolved Start date:2013-07-01
Priority:Must have Due date:
Assigned To:- % Done:

100%

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

Description

Filereferences are not added correctly for TCA-Fields group->file_refernces like:

        'single_fileref' => array(        
            'exclude' => 0,        
            'label' => 'LLL:EXT:mb_fileref/locallang_db.xml:tx_mbfileref_file.single_fileref',        
            'config' => array(
                'type' => 'group',
                'internal_type' => 'file_reference',
                'allowed' => '',    
                'disallowed' => 'php,php3',    
                'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'],    
                'show_thumbs' => 1,    
                'size' => 1,    
                'minitems' => 0,
                'maxitems' => 1,
            )
        ),

The files selected in such fields, has no entries for this fields in Ref-Column (Filelist module).
Tested with Typo3 6.0, 6.1, 6.2 (master)

Attached a small testextension.

mb_fileref_0.0.0.zip (13.6 kB) Martin Borer, 2013-07-01 12:42


Related issues

related to Core - Task #56352: Impexp: Files of TCA type "group" internal_type "file" ar... Resolved 2014-02-26
related to Core - Task #56991: RefIndex is broken for FlexForm fields group file_referen... Resolved 2014-03-17

Associated revisions

Revision 1dcb94c3
Added by Martin Borer almost 2 years ago

[BUGFIX] Fields of type file_reference are not properly indexed

sys_refindex entries for TCA-fields of type group->file_reference
are not correct. The fields ref_table and ref_uid are not filled.
This results in a wrong number of references in the Ref column of
the Filelist module and prevents a warning that a resource is still
in use when deleting it.

Resolves: #49538
Releases: 6.2, 6.1, 6.0
Change-Id: I1c44fc98b7ceefd6247ec372e5b28f8682a47bf1
Reviewed-on: https://review.typo3.org/21764
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring

Revision 8f1afaf3
Added by Martin Borer almost 2 years ago

[BUGFIX] Fields of type file_reference are not properly indexed

sys_refindex entries for TCA-fields of type group->file_reference
are not correct. The fields ref_table and ref_uid are not filled.
This results in a wrong number of references in the Ref column of
the Filelist module and prevents a warning that a resource is still
in use when deleting it.

Resolves: #49538
Releases: 6.2, 6.1, 6.0
Change-Id: I1c44fc98b7ceefd6247ec372e5b28f8682a47bf1
Reviewed-on: https://review.typo3.org/24448
Reviewed-by: Markus Klein
Tested-by: Markus Klein

Revision a7da2309
Added by Martin Borer almost 2 years ago

[BUGFIX] Fields of type file_reference are not properly indexed

sys_refindex entries for TCA-fields of type group->file_reference
are not correct. The fields ref_table and ref_uid are not filled.
This results in a wrong number of references in the Ref column of
the Filelist module and prevents a warning that a resource is still
in use when deleting it.

Resolves: #49538
Releases: 6.2, 6.1, 6.0
Change-Id: I1c44fc98b7ceefd6247ec372e5b28f8682a47bf1
Reviewed-on: https://review.typo3.org/24449
Reviewed-by: Markus Klein
Tested-by: Markus Klein

History

#1 Updated by Gerrit Code Review about 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/21764

#2 Updated by Gerrit Code Review almost 2 years ago

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

#3 Updated by Gerrit Code Review almost 2 years ago

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

#4 Updated by Henrik Ziegenhain almost 2 years ago

I can confirm this issue for 6.1

#5 Updated by Gerrit Code Review almost 2 years ago

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

#6 Updated by Gerrit Code Review almost 2 years ago

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

#7 Updated by Gerrit Code Review almost 2 years ago

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

#8 Updated by Markus Klein almost 2 years ago

  • Is Regression set to No

Can you please describe here how I can test that properly?
What does you extension help with?

Please tell us a "click path" in the BE.

#9 Updated by Martin Borer almost 2 years ago

Ho to test this Issue:
  1. Add a Filereference Test record to a Folder-Page
  2. Select a file in one of the two first fields (Single file reference or Multible file reference)
    • for example: fileadmin/user_upload/index.html
  3. Save Record
  4. Click Filelist Modul and browse to the folder where you've selected the file.
    • for example: fileadmin/user_upload/
  5. The selected file should have an entry in Ref Column. In Typo3 6.x this entry is missing. So if you want to delete this file, there will be no warning, that the file is referenced somewhere.

With the patch 21764 this will be fixed, and there will be a Ref. Entry for such referenced files.

#10 Updated by Markus Klein almost 2 years ago

Note that the patch only affects newly created file_references.
Hence to test this before and after the patch, you have to do step 2 of the guideline above again.

#11 Updated by Gerrit Code Review almost 2 years ago

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

#12 Updated by Gerrit Code Review almost 2 years ago

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

#13 Updated by Gerrit Code Review almost 2 years ago

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

#14 Updated by Martin Borer almost 2 years ago

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

#15 Updated by Andreas Moeller over 1 year ago

Is it possible that the same Bug still exists for FlexForm file_reference ?

Tested with Typo3 6.1.7

#16 Updated by Marc Bastian Heinrichs over 1 year ago

@Andreas, jep: see #56991

Also available in: Atom PDF