Project

General

Profile

Actions

Bug #58968

closed

RefIndex error when saving files via MM table

Added by Bernhard Kraft over 10 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2014-05-20
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
hard
Is Regression:
No
Sprint Focus:

Description

Assume the following TCA:

        'mail_files' => array(
                'exclude' => 1,
                'label' => 'LLL:EXT:webconinstance/Resources/Private/Localization/locallang_db.xml:tx_seminars_seminars.mail_files',
                'config' => array(
                        'type' => 'group',
                        'internal_type' => 'file',
                        'allowed' => 'pdf,xls,xlsx',
                        'uploadfolder' => 'uploads/tx_seminars/',
                        'size' => 10,
                        'MM' => 'tx_seminars_seminars_mail_files_mm',
                        'maxitems' => 10,
                        'wizards' => $tempWizardSend,
                ),
        ),

When trying to save any files to such a field this will cause an error when trying to update refindex
See attached screenshot

The problem seems to be caused by the following lines because $this->currentTable isn't set.

                        // Update ref index; In tcemain it is not certain that this will happen because
                        // if only the MM field is changed the record itself is not updated and so the ref-index is not either.
                        // This could also have been fixed in updateDB in tcemain, however I decided to do it here ...
                        $this->updateRefIndex($this->currentTable, $uid);


Files

bug-file-mm.png (72.1 KB) bug-file-mm.png Bernhard Kraft, 2014-05-21 13:35
Actions #1

Updated by Markus Klein over 10 years ago

You didn't mention that this line comes from RelationHandler::writeMM() line 747.

Do have a call stack? Would be interesting why $this->currentTable is not initialized. Looks like the start() method is not called with enough parameters.

Actions #2

Updated by Bernhard Kraft over 10 years ago

Ups. Forgot the screenshot. Here it is.

Actions #3

Updated by Markus Klein over 10 years ago

->start() call is missing in line 2067

Actions #4

Updated by Bernhard Kraft over 10 years ago

Seems so. But I assume just guessing the parameters and hoping it works wont be a solutino :)

I currently do not have time to dig into this any deeper.

Actions #5

Updated by Mathias Schreiber about 9 years ago

  • Target version deleted (next-patchlevel)
Actions #6

Updated by Susanne Moog over 4 years ago

  • Status changed from New to Closed

internal_type => file has been removed in current versions, therefor this ticket can be considered obsolete.

Actions

Also available in: Atom PDF